Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
- @@ -0,0 +1,120 @@
- +------------------------------------------------------------------------
- +r1272 | arris | 2011-02-13 14:11:35 +0100 (So, 13. Feb 2011) | 1 Zeile
- +
- +some dummy stuff for xattr and for mount options
- +------------------------------------------------------------------------
- +r1270 | arris | 2011-02-12 17:26:06 +0100 (Sa, 12. Feb 2011) | 1 Zeile
- +
- +version with mstar headers
- +------------------------------------------------------------------------
- +r1269 | arris | 2011-02-12 17:22:06 +0100 (Sa, 12. Feb 2011) | 1 Zeile
- +
- +xattr dummy functions added
- +------------------------------------------------------------------------
- +r1268 | arris | 2011-02-12 15:25:09 +0100 (Sa, 12. Feb 2011) | 1 Zeile
- +
- +merge from 1.2.3
- +------------------------------------------------------------------------
- +r1263 | arris | 2011-02-08 22:07:08 +0100 (Di, 08. Feb 2011) | 1 Zeile
- +
- +nick fixed
- +------------------------------------------------------------------------
- +r1258 | arris | 2011-02-07 20:15:13 +0100 (Mo, 07. Feb 2011) | 4 Zeilen
- +
- +adapt fixes for UExxB7020
- +need also patch in drivers/fsr/Kconfig:
- +config RFS_STL_DELETE drop MAPDESROY selection!!!
- +
- +------------------------------------------------------------------------
- +r1257 | arris | 2011-02-07 18:02:46 +0100 (Mo, 07. Feb 2011) | 1 Zeile
- +
- +synced fix for 2.6.34, kmalloc gone to slab.h
- +------------------------------------------------------------------------
- +r1255 | arris | 2011-02-06 21:01:15 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +initial fixes for SamyGO port
- +------------------------------------------------------------------------
- +r1254 | arris | 2011-02-06 20:48:13 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +initial fixes for SamyGO port
- +------------------------------------------------------------------------
- +r1253 | arris | 2011-02-06 19:58:03 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +initial fixes for SamyGO port
- +------------------------------------------------------------------------
- +r1247 | arris | 2011-02-06 18:42:02 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +2.6.33 bitmap_set function name conflict with new kernel function
- +------------------------------------------------------------------------
- +r1245 | arris | 2011-02-06 17:55:32 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +partial prepare for future functions
- +------------------------------------------------------------------------
- +r1244 | arris | 2011-02-06 16:05:43 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +initial fixes for SamyGO port
- +------------------------------------------------------------------------
- +r1243 | arris | 2011-02-06 15:27:51 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +2.6.33 raise version, bmap changes in kernel 2.6.33
- +------------------------------------------------------------------------
- +r1242 | arris | 2011-02-06 15:19:29 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +2.6.27 2.6.28 2.6.29 2.6.30 2.6.31 2.6.32 ok
- +------------------------------------------------------------------------
- +r1241 | arris | 2011-02-06 12:01:41 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +nothing function dependend
- +------------------------------------------------------------------------
- +r1240 | arris | 2011-02-06 10:39:35 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +2.6.27 rfs_permission arguments changed, added (incomplete) Documentation/README-RFS-SamyGO-port.txt
- +------------------------------------------------------------------------
- +r1239 | arris | 2011-02-06 09:21:55 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +2.6.24-rt1 CONFIG_PREEMPT(_RT) fix
- +------------------------------------------------------------------------
- +r1238 | arris | 2011-02-06 08:38:24 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +2.6.24 rfs_prepare_write rfs_commit_write replaced by rfs_write_begin rfs_write_end, added missing cast
- +------------------------------------------------------------------------
- +r1237 | arris | 2011-02-06 08:27:40 +0100 (So, 06. Feb 2011) | 1 Zeile
- +
- +2.6.24 rfs_prepare_write rfs_commit_write replaced by rfs_write_begin rfs_write_end
- +------------------------------------------------------------------------
- +r1236 | arris | 2011-02-05 16:17:17 +0100 (Sa, 05. Feb 2011) | 1 Zeile
- +
- +2.6.23 kmem_cache_create argument count changed, added SLAB_MEM_SPREAD flags too
- +------------------------------------------------------------------------
- +r1235 | arris | 2011-02-05 15:43:10 +0100 (Sa, 05. Feb 2011) | 1 Zeile
- +
- +2.6.22 SLAB_CTOR_* gone
- +------------------------------------------------------------------------
- +r1234 | arris | 2011-02-05 14:24:54 +0100 (Sa, 05. Feb 2011) | 1 Zeile
- +
- +2.6.20 SLAB_KERNEL gone, kmem_cache_t to struct kmem_cache, added more info to RFS_BUG in cluster.c, missed newline
- +------------------------------------------------------------------------
- +r1233 | arris | 2011-02-05 14:21:34 +0100 (Sa, 05. Feb 2011) | 1 Zeile
- +
- +2.6.20 SLAB_KERNEL gone, kmem_cache_t to struct kmem_cache, added more info to RFS_BUG in cluster.c
- +------------------------------------------------------------------------
- +r1232 | arris | 2011-02-05 13:37:57 +0100 (Sa, 05. Feb 2011) | 1 Zeile
- +
- +define fix for later comming kernel
- +------------------------------------------------------------------------
- +r1231 | arris | 2011-02-05 12:21:19 +0100 (Sa, 05. Feb 2011) | 1 Zeile
- +
- +2.6.19 generic_file_read generic_file_write gone
- +------------------------------------------------------------------------
- +r1230 | arris | 2011-02-05 10:02:30 +0100 (Sa, 05. Feb 2011) | 1 Zeile
- +
- +initial fixes for SamyGO port
- +------------------------------------------------------------------------
- +r1229 | arris | 2011-02-04 18:45:04 +0100 (Fr, 04. Feb 2011) | 1 Zeile
- +
- +added tree for patch generation from svn
- +------------------------------------------------------------------------
- +r1222 | arris | 2011-02-02 16:10:17 +0100 (Mi, 02. Feb 2011) | 1 Zeile
- +
- +added initial RFS sources from kernel_64m
- +------------------------------------------------------------------------
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt
- ___________________________________________________________________
- Hinzugefügt: svn:eol-style
- + native
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs_i.h
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs_i.h (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs_i.h (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -32,6 +32,16 @@
- * RFS file system inode data in memory (in-core)
- */
- +#ifdef CONFIG_RFS_FAST_SEEK /* needs implementation, arris */
- +struct fast_seek_info {
- + unsigned int interval;
- + unsigned int interval_bits;
- + unsigned int interval_mask;
- + unsigned int num_fpoints;
- + unsigned int *fpoints;
- +};
- +#endif
- +
- struct rfs_inode_info {
- __u32 start_clu; /* start cluster of inode */
- __u32 p_start_clu; /* parent directory start cluster */
- @@ -39,6 +49,23 @@
- __u32 last_clu; /* last cluster number */
- __u8 i_state; /* rfs-specific inode state */
- +#ifdef CONFIG_RFS_FS_XATTR /* needs implementation, arris */
- + __u32 xattr_start_clus; /* xattr start cluster */
- + __u32 xattr_last_clus; /* xattr last cluster */
- + __u32 xattr_numof_clus; /* xattr number of cluster */
- + __u16 xattr_ctime; /* xattr create time */
- + __u16 xattr_cdate; /* xattr create date */
- +
- + __u16 xattr_valid_count; /* valid attribute count */
- + __u32 xattr_total_space; /* used space(including deleted entry)*/
- + __u32 xattr_used_space; /* used space (except deleted entry) */
- + uid_t xattr_uid;
- + gid_t xattr_gid;
- + umode_t xattr_mode;
- +
- + struct rw_semaphore xattr_sem; /* xattr semaphore */
- +#endif
- +
- /* hint for quick search */
- __u32 hint_last_clu;
- __u32 hint_last_offset;
- @@ -47,6 +74,12 @@
- unsigned long trunc_start;
- spinlock_t write_lock;
- +
- +#ifdef CONFIG_RFS_FAST_SEEK /* needs implementation, arris */
- + /* fast seek info */
- + struct fast_seek_info *fast_seek;
- +#endif
- +
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
- /* total block size that inode allocated */
- loff_t mmu_private;
- @@ -60,6 +93,10 @@
- struct timer_list timer;
- struct task_struct *sleep_proc;
- #endif
- +
- +#ifdef CONFIG_RFS_FAST_LOOKUP /* needs implementation, arris */
- + __u8 fast; /* set if the file is opened with fast lookup option */
- +#endif
- };
- /* get inode info */
- @@ -75,5 +112,6 @@
- /* rfs-specific inode state */
- #define RFS_I_ALLOC 0x00
- #define RFS_I_FREE 0x01
- +#define RFS_I_MODIFIED 0x02
- #endif
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs.h
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs.h (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs.h (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -175,10 +175,34 @@
- (((x - VALID_CLU) << RFS_SB(sb)->blks_per_clu_bits) + \
- RFS_SB(sb)->data_start)
- +#define SET_XATTR_START_CLUSTER(x, xattr_start_clu) \
- +do { \
- + SET16((x)->ctime, (__u16)(xattr_start_clu & 0x0FFFF)); \
- + SET16((x)->cdate, (__u16)(xattr_start_clu >> 16)); \
- +} while (0)
- +
- #define IS_FREE(name) (((name[0] == DELETE_MARK) || (name[0] == 0x0))? 1 : 0 )
- #define IS_XSR(x) (MAJOR(x) == XSR_BLK_DEVICE_FTL ? 1 : 0)
- -
- +
- +#ifdef _RFS_INTERNAL_QUOTA
- +/* Mount flags */
- +#define RFS_MOUNT_USRQUOTA 0x01
- +#define RFS_MOUNT_GRPQUOTA 0x02
- +#endif
- +#define RFS_MOUNT_EA 0x04
- +#define RFS_MOUNT_CHECK_NO 0x08
- +#define RFS_MOUNT_CHECK_STRICT 0x10
- +
- +/* #define RFS_MOUNT_POSIX_ACL 0x10 */
- +#define RFS_MOUNT_XATTR_USER 0x04000 /* Extended user attributes */
- +
- +#define clear_opt(o, opt) (o &= ~RFS_MOUNT_##opt)
- +#define set_opt(o, opt) (o |= RFS_MOUNT_##opt)
- +#define test_opt(sb, opt) (RFS_SB(sb)->options.opts & \
- + RFS_MOUNT_##opt)
- +
- +
- /* function macro */
- #ifdef CONFIG_RFS_VFAT
- #define find_entry find_entry_long
- @@ -264,14 +288,26 @@
- union {
- struct {
- u8 ext_bpb[26];
- - u8 boot_code[446];
- +#ifdef CONFIG_RFS_FS_XATTR
- + u8 boot_code[440];
- +#else
- + u8 boot_code[446];
- +#endif
- } fat16;
- struct {
- u8 bpb[28];
- u8 ext_bpb[26];
- - u8 boot_code[418];
- +#ifdef CONFIG_RFS_FS_XATTR
- + u8 boot_code[412];
- +#else
- + u8 boot_code[418];
- +#endif
- } fat32;
- } u;
- +#ifdef CONFIG_RFS_FS_XATTR
- + u16 xattr_root_flag;
- + u32 xattr_start_clus;
- +#endif
- u8 boot_code[2];
- u16 signature;
- } __attribute__ ((packed));
- @@ -397,7 +433,11 @@
- int rfs_bmap (struct inode *, long, unsigned long *);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
- int rfs_get_block (struct inode *, sector_t, struct buffer_head *, int);
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
- +int rfs_permission (struct inode *, int);
- +#else
- int rfs_permission (struct inode *, int, struct nameidata *);
- +#endif
- #else
- int rfs_get_block (struct inode *, long, struct buffer_head *, int);
- int rfs_permission (struct inode *, int);
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs_sb.h
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs_sb.h (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs_sb.h (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -26,7 +26,12 @@
- #ifndef _LINUX_RFS_FS_SB
- #define _LINUX_RFS_FS_SB
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
- +#include <linux/semaphore.h>
- +#else
- #include <asm/semaphore.h>
- +#endif
- +
- /*
- * RFS file system superblock data in memory(in-core)
- */
- @@ -35,6 +40,7 @@
- struct rfs_mount_info {
- char *codepage;
- __u32 isvfat;
- + __u32 opts; /* needs implementation, arris, partial done */
- };
- /* rfs private data structure of sb */
- @@ -74,6 +80,10 @@
- /* hint info for fast unlink */
- void *pool_info;
- + /* CONFIG_RFS_RDONLY_MOUNT */ /* needs implementation, arris */
- + __u32 use_log;
- + __u32 use_pool;
- +
- /* chunk list for map destroy */
- struct list_head free_chunks;
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
- @@ -0,0 +1,76 @@
- +/* file for future usage, by arris */
- +/*
- + * linux/fs/rfs/xattr_user.c
- + * Handler for extended user attributes.
- + *
- + */
- +
- +/* #include <linux/module.h>
- +#include <linux/string.h>
- +#include <linux/fs.h> */
- +#include <linux/xattr.h>
- +
- +#include <linux/rfs_fs.h>
- +#include "rfs.h"
- +#include "xattr.h"
- +
- + static size_t
- +rfs_xattr_user_list(struct dentry *dentry, char *list, size_t list_size,
- + const char *name, size_t name_len, int type)
- +{
- + const size_t prefix_len = XATTR_USER_PREFIX_LEN;
- + const size_t total_len = prefix_len + name_len + 1;
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + if (!test_opt(dentry->d_sb, XATTR_USER))
- + return 0;
- +
- + if (list && total_len <= list_size) {
- + memcpy(list, XATTR_USER_PREFIX, prefix_len);
- + memcpy(list+prefix_len, name, name_len);
- + list[prefix_len + name_len] = '\0';
- + }
- + return total_len;
- +}
- +
- + static int
- +rfs_xattr_user_get(struct dentry *dentry, const char *name,
- + void *buffer, size_t size, int type)
- +{
- + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + if (strcmp(name, "") == 0)
- + return -EINVAL;
- + if (!test_opt(dentry->d_sb, XATTR_USER))
- + return -EOPNOTSUPP;
- +
- + /* memcpy name etc to param? arris */
- + return rfs_xattr_get(dentry->d_inode, param, (unsigned int *)type);
- +}
- +
- + static int
- +rfs_xattr_user_set(struct dentry *dentry, const char *name,
- + const void *value, size_t size, int flags, int type)
- +{
- + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + if (strcmp(name, "") == 0)
- + return -EINVAL;
- + if (!test_opt(dentry->d_sb, XATTR_USER))
- + return -EOPNOTSUPP;
- +
- + /* memcpy name etc to param? arris */
- + return rfs_xattr_set(dentry->d_inode, param);
- +}
- +
- +struct xattr_handler rfs_xattr_user_handler = {
- + .prefix = XATTR_USER_PREFIX,
- + .list = rfs_xattr_user_list,
- + .get = rfs_xattr_user_get,
- + .set = rfs_xattr_user_set,
- +};
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c
- ___________________________________________________________________
- Hinzugefügt: svn:eol-style
- + native
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
- @@ -0,0 +1,110 @@
- +/* file for future usage, by arris */
- +
- +#include <linux/rfs_fs.h>
- +
- +#include "xattr.h"
- +
- +static struct xattr_handler *rfs_xattr_handler_map[] = {
- + [RFS_XATTR_NS_USER] = &rfs_xattr_user_handler,
- +#ifdef CONFIG_RFS_FS_POSIX_ACL
- + [RFS_XATTR_NS_POSIX_ACL_ACCESS] = &rfs_xattr_acl_access_handler,
- + [RFS_XATTR_NS_POSIX_ACL_DEFAULT] = &rfs_xattr_acl_default_handler,
- +#endif
- + [RFS_XATTR_NS_TRUSTED] = &rfs_xattr_trusted_handler,
- +#ifdef CONFIG_RFS_FS_SECURITY
- + [RFS_XATTR_NS_SECURITY] = &rfs_xattr_security_handler,
- +#endif
- +};
- +
- +struct xattr_handler *rfs_xattr_handlers[] = {
- + &rfs_xattr_user_handler,
- + &rfs_xattr_trusted_handler,
- +#ifdef CONFIG_RFS_FS_POSIX_ACL
- + &rfs_xattr_acl_access_handler,
- + &rfs_xattr_acl_default_handler,
- +#endif
- +#ifdef CONFIG_RFS_FS_SECURITY
- + &rfs_xattr_security_handler,
- +#endif
- + NULL
- +};
- +
- +static inline struct xattr_handler *rfs_xattr_handler(int name_index)
- +{
- + struct xattr_handler *handler = NULL;
- +
- + if (name_index > 0 && name_index < ARRAY_SIZE(rfs_xattr_handler_map))
- + handler = rfs_xattr_handler_map[name_index];
- + return handler;
- +}
- +
- +int rfs_xattr_get(struct inode *inode, struct rfs_xattr_param *param, unsigned int *dummy){
- + int err = 0;
- +
- + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)¶m->name);
- +
- +// down_read(&RFS_I(dentry->d_inode)->xattr_sem);
- +
- +// up_read(&RFS_I(dentry->d_inode)->xattr_sem);
- +
- + return err;
- +}
- +
- +int rfs_do_xattr_set(struct inode *inode, struct rfs_xattr_param *param){
- + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)¶m->name);
- + return 0;
- +}
- +
- +int rfs_xattr_set(struct inode *inode, struct rfs_xattr_param *param){
- + int err = 0;
- +
- + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)¶m->name);
- +
- +// down_write(&RFS_I(dentry->d_inode)->xattr_sem);
- + err = rfs_do_xattr_set(inode, param);
- +// up_write(&RFS_I(dentry->d_inode)->xattr_sem);
- +
- + return err;
- +}
- +
- +int rfs_do_xattr_delete(struct inode *inode, struct rfs_xattr_param *param){
- + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)¶m->name);
- + return 0;
- +}
- +
- +int rfs_xattr_delete(struct inode *inode, struct rfs_xattr_param *param){
- + int err = 0;
- +
- + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)¶m->name);
- +
- + err = rfs_do_xattr_delete(inode, param);
- +
- + return err;
- +}
- +
- +ssize_t rfs_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size){
- + int err = 0;
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- +// down_read(&RFS_I(dentry->d_inode)->xattr_sem);
- +
- +// up_read(&RFS_I(dentry->d_inode)->xattr_sem);
- +
- + return err;
- +}
- +
- +int rfs_xattr_read_header_to_inode(struct inode *inode, int b){
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- + return 0;
- +}
- +
- +int rfs_xattr_write_header(struct inode *inode){
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- + return 0;
- +}
- +
- +int __xattr_io(int a, struct inode *inode, unsigned long c, char *buffer, unsigned int buffer_size){
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- + return 0;
- +}
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.c
- ___________________________________________________________________
- Hinzugefügt: svn:eol-style
- + native
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode_26.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode_26.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode_26.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
- @@ -0,0 +1,2 @@
- +/* file for future usage, by arris */
- +
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode_26.c
- ___________________________________________________________________
- Hinzugefügt: svn:eol-style
- + native
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.h
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.h (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.h (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
- @@ -0,0 +1,212 @@
- +/*
- + *---------------------------------------------------------------------------*
- + * *
- + * COPYRIGHT 2003-2009 SAMSUNG ELECTRONICS CO., LTD. *
- + * ALL RIGHTS RESERVED *
- + * *
- + * Permission is hereby granted to licensees of Samsung Electronics *
- + * Co., Ltd. products to use or abstract this computer program only in *
- + * accordance with the terms of the NAND FLASH MEMORY SOFTWARE LICENSE *
- + * AGREEMENT for the sole purpose of implementing a product based on *
- + * Samsung Electronics Co., Ltd. products. No other rights to reproduce, *
- + * use, or disseminate this computer program, whether in part or in *
- + * whole, are granted. *
- + * *
- + * Samsung Electronics Co., Ltd. makes no representation or warranties *
- + * with respect to the performance of this computer program, and *
- + * specifically disclaims any responsibility for any damages, *
- + * special or consequential, connected with the use of this program. *
- + * *
- + *---------------------------------------------------------------------------*
- +*/
- +/**
- + * @version RFS_1.3.1_b070_RTM
- + * @file fs/rfs/xattr.h
- + * @brief local header file for xattr
- + *
- + *
- + */
- +#include "rfs.h"
- +#ifndef _XATTR_H
- +#define _XATTR_H
- +
- +#define RFS_XATTR_HEAD_SIGNATURE ((__u16)(0x1097))
- +#define RFS_XATTR_ENTRY_SIGNATURE ((__u16)(0xA5A5))
- +#define ENOATTR ENODATA
- +#define EFULLATTR ENOTEMPTY
- +
- +/****************************************
- + * configuration of Extended Attribute
- + ****************************************/
- +/* the maximum byte size of name */
- +#define RFS_XATTR_NAME_LENGTH_MAX XATTR_NAME_MAX
- +/* the maximum byte size of value */
- +#define RFS_XATTR_VALUE_LENGTH_MAX XATTR_SIZE_MAX
- +/* the maximum number of extended attributes */
- +#define RFS_XATTR_ENTRY_NUMBER_MAX 128
- +/* the maximum byte size of total extended attributes */
- +#define RFS_XATTR_LIST_SIZE_MAX (64 * 1024)
- +
- +/* Threshold size of xattr compaction. refer __xattr_compaction().*/
- +#define XATTR_COMPACTION_THRESHOLD (RFS_XATTR_LIST_SIZE_MAX << 1)
- +
- +/****************************************
- + * marco define for Extended Attribute
- + ****************************************/
- +#define IS_XATTR_EXIST(rii) ((rii)->xattr_start_clus != CLU_TAIL)
- +#define IS_USED_XATTR_ENTRY(flag) ((flag) == XATTR_ENTRY_USED)
- +#define IS_DELETE_XATTR_ENTRY(flag) ((flag) == XATTR_ENTRY_DELETE)
- +
- +
- +/****************************************
- + * type define for Extended Attribute
- + ****************************************/
- +extern struct xattr_handler *rfs_xattr_handlers[];
- +
- +typedef unsigned int XATTR_NS; /* XATTR_NAMESPACE_ID */
- +enum _XATTR_NAMESPACE_ID
- +{
- + RFS_XATTR_NS_USER = 1,
- + RFS_XATTR_NS_POSIX_ACL_ACCESS = 2,
- + RFS_XATTR_NS_POSIX_ACL_DEFAULT = 3,
- + RFS_XATTR_NS_TRUSTED = 4,
- + RFS_XATTR_NS_SECURITY = 5
- +};
- +
- +/* Flags for extended attribute set operation */
- +typedef int XATTR_SET_FLAG;
- +enum _XATTR_SET_FLAG
- +{
- +/* if ATTR already exists, replace and if doesn't exist, create */
- + XATTR_SET_FLAG_NONE = 0x0000,
- +/* if ATTR already exists, fail */
- + XATTR_SET_FLAG_CREATE = 0x0001,
- +/* if ATTR does not exist, fail */
- + XATTR_SET_FLAG_REPLACE = 0x0002,
- + XATTR_SET_FLAG_DUMMY = 0x7FFFFFFF
- +};
- +
- +/* flag for xattr entry status */
- +typedef signed int XATTR_ENTRY_FLAG;
- +enum _XATTR_ENTRY_FLAG
- +{
- + XATTR_ENTRY_NONE = 0x00, /* no flag */
- + XATTR_ENTRY_USED = 0x01, /* used mark */
- + XATTR_ENTRY_DELETE = 0x02, /* delete mark */
- + XATTR_ENTRY_DUMMY = 0x7FFFFFFF
- +};
- +
- +/* xattr header struct */
- +/* [Caution] sizeof(rfs_xattr_header) should be 64byte */
- +struct rfs_xattr_header
- +{
- + __u16 signature; /* signature of header*/
- + __u16 ctime; /* create time of directory entry */
- + __u16 cdate; /* create date of directriy entry */
- + __u16 mode; /* mode */
- + __u32 uid; /* user id */
- + __u32 gid; /* group id */
- + __u16 valid_count; /* valid attribute count */
- + __u16 reserv1; /* reservation field 1 */
- + __u32 total_space; /* used space (including deleted entry) */
- + __u32 used_space; /* used space (except deleted entry) */
- + __u32 numof_clus; /* number of allocated cluster */
- + __u32 pdir; /* parent directory' start cluster */
- + __u32 entry; /* directory index in pdir */
- + __u32 reserv2[6]; /* reservation field 2 */
- +} __attribute__ ((packed));
- +
- +/* xattr entry struct */
- +/* [Caution] sizeof(rfs_xattr_entry) should be 32byte */
- +struct rfs_xattr_entry {
- + __u8 type_flag; /* EA entry type flag */
- + __u8 ns_id; /* EA name space id */
- + __u16 name_length; /* EA name length (byte unit) */
- + __u32 value_length; /* EA value length (byte unit) */
- + __u32 entry_length; /* EA entry length (byte unit)
- + * rfs_xattr_entry + name + value + padding
- + * entray_length align to 32byte */
- + __u16 crc16; /* crc16 check sum (optional) */
- + __u32 reserv[4]; /* reservation field */
- + __u16 signature; /* signature of entry header */
- +} __attribute__ ((packed));
- +
- +/* structure for ea parameter (in-memory struct) */
- +struct rfs_xattr_param
- +{
- + /* extended attribute name or list of name */
- + char *name;
- + /* name length */
- + unsigned int name_length;
- +
- + /* extended attribute value */
- + void *value;
- +
- + /* buffer size for extended attribute value or list */
- + /* if size is 0, size of buffer or list will be returned */
- + unsigned int value_length;
- +
- + /* namespace id of extended attribute name */
- + XATTR_NS id;
- +
- + /* extended attribute set flag */
- + XATTR_SET_FLAG set_flag;
- +};
- +
- +extern struct xattr_handler rfs_xattr_user_handler;
- +extern struct xattr_handler rfs_xattr_trusted_handler;
- +#ifdef CONFIG_RFS_FS_POSIX_ACL
- +extern struct xattr_handler rfs_xattr_acl_access_handler;
- +extern struct xattr_handler rfs_xattr_acl_default_handler;
- +#endif
- +#ifdef CONFIG_RFS_FS_SECURITY
- +extern struct xattr_handler rfs_xattr_security_handler;
- +#endif
- +
- +/*********************************************
- + * function prototypes for Extended Attribute
- + *********************************************/
- +extern int
- +rfs_xattr_get(struct inode *, struct rfs_xattr_param *, unsigned int *);
- +
- +extern int
- +rfs_do_xattr_set(struct inode *, struct rfs_xattr_param *);
- +extern int
- +rfs_xattr_set(struct inode *, struct rfs_xattr_param *);
- +
- +extern int
- +rfs_do_xattr_delete(struct inode *, struct rfs_xattr_param *);
- +extern int
- +rfs_xattr_delete(struct inode *, struct rfs_xattr_param *);
- +
- +extern ssize_t
- +rfs_xattr_list(struct dentry *, char *, size_t);
- +
- +extern int
- +rfs_xattr_read_header_to_inode(struct inode *, int);
- +
- +extern int
- +rfs_xattr_write_header(struct inode *);
- +
- +extern int
- +__xattr_io(int, struct inode *, unsigned long, char *, unsigned int);
- +
- +#ifdef CONFIG_RFS_FS_SECURITY
- +extern int rfs_init_security(struct inode *inode, struct inode *dir);
- +#else
- +static inline int rfs_init_security(struct inode *inode, struct inode *dir)
- +{
- + return 0;
- +}
- +#endif
- +#ifdef CONFIG_RFS_FS_FULL_PERMISSION
- +extern int
- +rfs_do_xattr_set_guidmode(struct inode *, uid_t *, gid_t *, umode_t *);
- +
- +extern int
- +rfs_xattr_set_guidmode(struct inode *, uid_t *, gid_t *, umode_t *);
- +
- +extern int
- +rfs_xattr_get_guidmode(struct inode *, uid_t *, gid_t *, umode_t *);
- +#endif
- +#endif /* _XATTR_H */
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.h
- ___________________________________________________________________
- Hinzugefügt: svn:eol-style
- + native
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/fcache.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/fcache.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/fcache.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
- @@ -0,0 +1 @@
- +/* file for future usage, by arris */
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/fcache.c
- ___________________________________________________________________
- Hinzugefügt: svn:eol-style
- + native
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
- @@ -0,0 +1,70 @@
- +/* file for future usage, by arris */
- +/*
- + * linux/fs/rfs/xattr_trusted.c
- + * Handler for trusted extended attributes.
- + *
- + */
- +
- +/* #include <linux/module.h>
- +#include <linux/string.h>
- +#include <linux/fs.h> */
- +#include <linux/capability.h>
- +#include <linux/xattr.h>
- +#include "rfs.h"
- +#include "xattr.h"
- +
- + static size_t
- +rfs_xattr_trusted_list(struct dentry *dentry, char *list, size_t list_size,
- + const char *name, size_t name_len, int type)
- +{
- + const size_t prefix_len = XATTR_TRUSTED_PREFIX_LEN;
- + const size_t total_len = prefix_len + name_len + 1;
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + if (!capable(CAP_SYS_ADMIN))
- + return 0;
- +
- + if (list && total_len <= list_size) {
- + memcpy(list, XATTR_TRUSTED_PREFIX, prefix_len);
- + memcpy(list+prefix_len, name, name_len);
- + list[prefix_len + name_len] = '\0';
- + }
- + return total_len;
- +}
- +
- + static int
- +rfs_xattr_trusted_get(struct dentry *dentry, const char *name, void *buffer,
- + size_t size, int type)
- +{
- + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + if (strcmp(name, "") == 0)
- + return -EINVAL;
- +
- + /* memcpy name etc to param? arris */
- + return rfs_xattr_get(dentry->d_inode, param, (unsigned int *)type);
- +}
- +
- + static int
- +rfs_xattr_trusted_set(struct dentry *dentry, const char *name,
- + const void *value, size_t size, int flags, int type)
- +{
- + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + if (strcmp(name, "") == 0)
- + return -EINVAL;
- + /* memcpy name etc to param? arris */
- + return rfs_xattr_set(dentry->d_inode, param);
- +}
- +
- +struct xattr_handler rfs_xattr_trusted_handler = {
- + .prefix = XATTR_TRUSTED_PREFIX,
- + .list = rfs_xattr_trusted_list,
- + .get = rfs_xattr_trusted_get,
- + .set = rfs_xattr_trusted_set,
- +};
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c
- ___________________________________________________________________
- Hinzugefügt: svn:eol-style
- + native
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
- @@ -0,0 +1,88 @@
- +/* file for future usage, by arris */
- +/*
- + * linux/fs/rfs/xattr_security.c
- + * Handler for storing security labels as extended attributes.
- + */
- +
- +// #include <linux/string.h>
- +// #include <linux/fs.h>
- +#include <linux/security.h>
- +#include <linux/xattr.h>
- +#include "rfs.h"
- +#include "xattr.h"
- +
- +static size_t rfs_xattr_security_list(struct dentry *dentry, char *list, size_t list_size,
- + const char *name, size_t name_len, int type)
- +{
- + const size_t prefix_len = sizeof(XATTR_SECURITY_PREFIX)-1;
- + const size_t total_len = prefix_len + name_len + 1;
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + if (list && total_len <= list_size) {
- + memcpy(list, XATTR_SECURITY_PREFIX, prefix_len);
- + memcpy(list+prefix_len, name, name_len);
- + list[prefix_len + name_len] = '\0';
- + }
- + return total_len;
- +}
- +
- +static int rfs_xattr_security_get(struct dentry *dentry, const char *name,
- + void *buffer, size_t size, int type)
- +{
- + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + if (strcmp(name, "") == 0)
- + return -EINVAL;
- +
- + /* memcpy name etc to param? arris */
- + return rfs_xattr_get(dentry->d_inode, param, (unsigned int *)type);
- + // RFS_XATTR_NS_SECURITY
- +}
- +
- +static int rfs_xattr_security_set(struct dentry *dentry, const char *name,
- + const void *value, size_t size, int flags, int type)
- +{
- + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + if (strcmp(name, "") == 0)
- + return -EINVAL;
- +
- + /* memcpy name etc to param? arris */
- + return rfs_xattr_set(dentry->d_inode, param);
- +}
- +
- +int rfs_init_security(struct inode *inode, struct inode *dir)
- +{
- + int err;
- + size_t len;
- + void *value;
- + char *name;
- +
- + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
- +
- + err = security_inode_init_security(inode, dir, &name, &value, &len);
- + if (err) {
- + if (err == -EOPNOTSUPP)
- + return 0;
- + return err;
- + }
- +
- + /* err = rfs_xattr_set_handle(handle, inode, RFS_XATTR_NS_SECURITY,
- + name, value, len, 0);
- + */
- + kfree(name);
- + kfree(value);
- + return err;
- +}
- +
- +struct xattr_handler rfs_xattr_security_handler = {
- + .prefix = XATTR_SECURITY_PREFIX,
- + .list = rfs_xattr_security_list,
- + .get = rfs_xattr_security_get,
- + .set = rfs_xattr_security_set,
- +};
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c
- ___________________________________________________________________
- Hinzugefügt: svn:eol-style
- + native
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/misc.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/misc.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/misc.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
- @@ -0,0 +1,11 @@
- +/* file for future usage, by arris */
- +
- +#include <linux/module.h>
- +
- +MODULE_LICENSE("GPL and additional rights");
- +MODULE_VERSION(CONFIG_RFS_VERSION"-SamyGO");
- +MODULE_DESCRIPTION("http://www.samygo.tv/");
- +MODULE_DESCRIPTION("http://www.samsung.com/global/business/semiconductor/products/fusionmemory/Products_RFS_ApplicationNotes.html");
- +MODULE_DESCRIPTION("SAMSUNG RFS (Robust File System)");
- +MODULE_DESCRIPTION("SamyGO Port by: Ser Lev Arris <arris@ZsoltTech.Com>");
- +MODULE_DESCRIPTION("SamyGO thanks to: marcelr");
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/misc.c
- ___________________________________________________________________
- Hinzugefügt: svn:eol-style
- + native
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/super.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/super.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/super.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -41,11 +41,16 @@
- #ifdef RFS_FOR_2_6
- enum {
- - opt_codepage, opt_err,
- + opt_codepage, opt_acl, opt_noacl, opt_vfat, opt_xattr, opt_noxattr, opt_err,
- };
- static match_table_t rfs_tokens = {
- {opt_codepage, "codepage=%s"},
- + {opt_acl, "acl"},
- + {opt_noacl, "noacl"},
- + {opt_vfat, "vfat"},
- + {opt_xattr, "xattr"},
- + {opt_noxattr, "noxattr"},
- {opt_err, NULL}
- };
- #endif
- @@ -251,6 +256,13 @@
- if (!options)
- goto out;
- + /*
- + * in include/linux/rfs_fs.h
- + * #define clear_opt(o, opt) (o &= ~RFS_MOUNT_##opt)
- + * #define set_opt(o, opt) (o |= RFS_MOUNT_##opt)
- + * #define test_opt(sb, opt) (RFS_SB(sb)->options.opts & \
- + * RFS_MOUNT_##opt) */
- +
- #ifdef RFS_FOR_2_6
- while ((p = strsep(&options, ",")) != NULL) {
- int token;
- @@ -267,6 +279,16 @@
- return -ENOENT;
- opts->codepage = codepage;
- break;
- + case opt_noxattr:
- + clear_opt(opts->opts, XATTR_USER);
- + case opt_xattr:
- + set_opt(opts->opts, XATTR_USER);
- + break;
- + case opt_vfat:
- + case opt_acl:
- + case opt_noacl:
- + DEBUG(DL0, "Mount option %s is not supported\n",p);
- + break;
- default:
- return -EINVAL;
- }
- @@ -492,7 +514,9 @@
- inode->i_gid = 0;
- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
- +#ifndef RFS_FOR_2_6_19
- inode->i_blksize = sb->s_blocksize;
- +#endif
- inode->i_version = 0;
- insert_inode_hash(inode);
- @@ -552,13 +576,12 @@
- #ifdef RFS_FOR_2_6
- struct rfs_sb_info *sbi;
- - sbi = kmalloc(sizeof(struct rfs_sb_info), GFP_KERNEL);
- + /* initialize sbi with 0x00 */
- + /* log_info and pool_info must be initialized with 0 */
- + sbi = kzalloc(sizeof(struct rfs_sb_info), GFP_KERNEL);
- if (!sbi) /* memory error */
- goto failed_mount;
- - /* initialize sbi with 0x00 */
- - /* log_info and pool_info must be initialized with 0 */
- - memset(sbi, 0x00, sizeof(struct rfs_sb_info));
- sb->s_fs_info = sbi;
- old_blksize = block_size(sb->s_bdev);
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -191,6 +191,7 @@
- }
- #else
- +#ifndef RFS_FOR_2_6_24
- static int rfs_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to)
- {
- struct inode *inode = page->mapping->host;
- @@ -209,8 +210,10 @@
- return ret;
- }
- +#endif /* ! RFS_FOR_2_6_24 */
- #endif
- +#ifndef RFS_FOR_2_6_24
- /**
- * write a specified page
- * @param file to write file
- @@ -237,13 +240,54 @@
- return ret;
- }
- +#endif /* ! RFS_FOR_2_6_24 */
- +#ifdef RFS_FOR_2_6_24
- +static int rfs_write_begin(struct file *file, struct address_space *mapping,
- + loff_t pos, unsigned len, unsigned flags,
- + struct page **pagep, void **fsdata){
- + struct inode *inode = mapping->host;
- + int ret = 0;
- +
- + if (rfs_log_start(inode->i_sb, RFS_LOG_WRITE, inode))
- + return -EIO;
- +
- + *pagep = NULL;
- + ret = cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
- + rfs_get_block, &(RFS_I(inode)->mmu_private));
- +
- + return ret;
- +}
- +static int rfs_write_end(struct file *file, struct address_space *mapping,
- + loff_t pos, unsigned len, unsigned copied,
- + struct page *page, void *fsdata){
- + struct inode *inode = mapping->host;
- + int ret = 0;
- +
- + ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
- +
- + if (ret < len)
- + RFS_BUG("Failed to write whole data(%u from %u pos: %lu)\n", ret, len, (unsigned long)pos);
- +
- + if (ret) {
- + RFS_I(inode)->trunc_start = RFS_I(inode)->mmu_private;
- + rfs_log_end(inode->i_sb, ret);
- + }
- + return ret;
- +}
- +#endif /* RFS_FOR_2_6_24 */
- +
- struct address_space_operations rfs_aops = {
- .readpage = rfs_readpage,
- .writepage = rfs_writepage,
- .sync_page = block_sync_page,
- - .prepare_write = rfs_prepare_write,
- +#ifdef RFS_FOR_2_6_24
- + .write_begin = rfs_write_begin,
- + .write_end = rfs_write_end,
- +#else
- + .prepare_write = rfs_prepare_write,
- .commit_write = rfs_commit_write,
- +#endif
- .direct_IO = rfs_direct_IO,
- #ifdef RFS_FOR_2_6
- .readpages = rfs_readpages,
- @@ -437,7 +481,9 @@
- inode->i_version = 0;
- GET_ENTRY_TIME(ep, inode);
- +#ifndef RFS_FOR_2_6_19
- inode->i_blksize = sb->s_blocksize;
- +#endif
- inode->i_blocks = (inode->i_size + SECTOR_SIZE - 1) >> SECTOR_BITS;
- @@ -500,7 +546,16 @@
- dir->i_nlink++;
- } else if (type == TYPE_FILE || type == TYPE_SYMLINK) {
- /* initialize it when only create time */
- +#if defined(CONFIG_PREEMPT) && defined(RFS_FOR_2_6_24) /* kernel_64m is tr patched and inode->i_mapping->nrpages is ok!
- + * but for 2.6.24 (aquila) we need inode->i_mapping ? */
- +
- + truncate_inode_pages(inode->i_mapping, 0); /* it works on tv with rt patched 2.6.24
- + * but...
- + * unmap_mapping_range(inode->i_mapping, 0, 0, 0);
- + * is more correct? */
- +#else
- inode->i_mapping->nrpages = 0;
- +#endif
- }
- /* get new inode number */
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs.h
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs.h (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs.h (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -29,15 +29,25 @@
- #include <linux/sched.h>
- #include <linux/version.h>
- -#include <asm/semaphore.h>
- +#include <linux/buffer_head.h>
- /*
- * kernel version macro
- */
- #undef RFS_FOR_2_4
- #undef RFS_FOR_2_6
- +#undef RFS_FOR_2_6_10
- +#undef RFS_FOR_2_6_16
- #undef RFS_FOR_2_6_17
- #undef RFS_FOR_2_6_18
- +#undef RFS_FOR_2_6_19
- +#undef RFS_FOR_2_6_20
- +#undef RFS_FOR_2_6_22
- +#undef RFS_FOR_2_6_23
- +#undef RFS_FOR_2_6_24
- +#undef RFS_FOR_2_6_27
- +#undef RFS_FOR_2_6_29
- +#undef RFS_FOR_2_6_34
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
- #define RFS_FOR_2_6 1
- @@ -45,13 +55,46 @@
- #define RFS_FOR_2_4 1
- #endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
- +#define RFS_FOR_2_6_34 1
- +#endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
- +#define RFS_FOR_2_6_29 1
- +#endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
- +#define RFS_FOR_2_6_27 1
- +#endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
- +#define RFS_FOR_2_6_24 1
- +#endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
- +#define RFS_FOR_2_6_23 1
- +#endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
- +#define RFS_FOR_2_6_22 1
- +#endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
- +#define RFS_FOR_2_6_20 1
- +#endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
- +#define RFS_FOR_2_6_19 1
- +#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
- -#define RFS_FOR_2_6_18 1
- +#define RFS_FOR_2_6_18 1
- #endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
- -#define RFS_FOR_2_6_17 1
- +#define RFS_FOR_2_6_17 1
- #endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
- +#define RFS_FOR_2_6_16 1
- +#endif
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10)
- +#define RFS_FOR_2_6_10 1
- +#endif
- +#ifdef RFS_FOR_2_6_34
- +#include <linux/slab.h>
- +#endif
- typedef enum rfs_lock_type {
- RFS_FAT_LOCK,
- @@ -137,6 +180,12 @@
- } \
- } while (0)
- +#ifdef RFS_FOR_2_6_27
- +#include <linux/semaphore.h>
- +#else
- +#include <asm/semaphore.h>
- +#endif
- +
- struct rfs_semaphore {
- struct semaphore mutex;
- pid_t owner;
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Kconfig
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Kconfig (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Kconfig (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -2,11 +2,13 @@
- config RFS_FS
- tristate "Robust FAT Filesystem (RFS) support"
- + default m
- help
- Samsung Robust File System support.
- config RFS_VFAT
- bool "FAT && long file name support"
- + default y
- depends on RFS_FS
- config RFS_SYNC_ON_CLOSE
- @@ -16,13 +18,61 @@
- config RFS_NLS
- bool "Support NLS on RFS filesystem"
- select NLS
- + default y
- depends on RFS_VFAT
- config RFS_DEFAULT_CODEPAGE
- string "Use default NLS codepage"
- - default "cp949"
- + default NLS_DEFAULT
- depends on RFS_NLS
- +config RFS_POSIX_ATTR
- + bool "POSIX attribute support"
- + default false
- + depends on RFS_FS
- +
- +config RFS_FS_XATTR
- + bool "RFS extended attributes"
- + depends on RFS_FS
- + default false
- + help
- + Extended attributes are name:value pairs associated with inodes
- + by the kernel or by users (see the attr(5) manual page,
- + or visit <http://acl.bestbits.at/> for details).
- +
- +config RFS_FS_SECURITY
- + bool "RFS Security Labels"
- + depends on RFS_FS_XATTR
- + help
- + Security labels support alternative access control models
- + implemented by security modules like SELinux.
- + This option enables an extended attribute namespace
- + for inode security labels in the RFS filesystem.
- +
- +#config RFS_FS_FULL_PERMISSION
- +# bool "support 32bit uid, gid"
- +# depends on RFS_FS_XATTR && RFS_POSIX_ATTR
- +
- +config RFS_FAST_LOOKUP
- + bool "RFS fast file lookup"
- + default false
- + depends on RFS_FS
- +
- +config RFS_FAST_SEEK
- + bool "RFS fast seek"
- + default false
- + depends on RFS_FS
- +
- +#config RFS_QUOTA
- +# bool
- +# depends on QUOTA && RFS_POSIX_ATTR
- +# default y
- +
- +config RFS_UID_BITS
- + int
- + default 8
- + depends on RFS_POSIX_ATTR
- +
- config RFS_FAT_DEBUG
- bool "FAT Debug Message support"
- depends on RFS_FS
- @@ -33,7 +83,8 @@
- depends on RFS_FAT_DEBUG
- config RFS_MAPDESTROY
- - bool
- + bool
- + default false
- config RFS_PRE_ALLOC
- int
- @@ -41,6 +92,6 @@
- config RFS_VERSION
- string
- - default "1.2.2p1-rc2"
- + default "RFS_1.3.1_b070"
- endmenu
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs_26.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs_26.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs_26.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -262,7 +262,11 @@
- }
- /* local variable definition */
- +#ifdef RFS_FOR_2_6_20
- +static struct kmem_cache *rfs_inode_cachep = NULL;
- +#else
- static kmem_cache_t *rfs_inode_cachep = NULL;
- +#endif
- /* static function definition */
- /**
- @@ -271,12 +275,22 @@
- * @param cachep a pointer for inode cache
- * @param flags control flag
- */
- +#ifdef RFS_FOR_2_6_27
- +static void init_once(void *foo)
- +#elif defined RFS_FOR_2_6_24
- +static void init_once(struct kmem_cache *cachep, void *foo)
- +#elif defined RFS_FOR_2_6_20
- +static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
- +#else
- static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
- +#endif
- {
- struct rfs_inode_info *ei = (struct rfs_inode_info *) foo;
- +#ifndef RFS_FOR_2_6_22
- if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
- SLAB_CTOR_CONSTRUCTOR)
- +#endif
- inode_init_once(&ei->vfs_inode);
- }
- @@ -286,9 +300,15 @@
- static int __init rfs_init_inodecache(void)
- {
- rfs_inode_cachep = kmem_cache_create("rfs_inode_cache",
- - sizeof(struct rfs_inode_info),
- - 0, SLAB_RECLAIM_ACCOUNT,
- - init_once, NULL);
- + sizeof(struct rfs_inode_info),
- +#ifdef RFS_FOR_2_6_23
- + 0, (SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD),
- + init_once);
- +#else
- + 0, SLAB_RECLAIM_ACCOUNT,
- + init_once, NULL);
- +#endif
- +
- if (!rfs_inode_cachep)
- return -ENOMEM;
- @@ -316,7 +336,11 @@
- {
- struct rfs_inode_info *new;
- +#ifdef RFS_FOR_2_6_20
- + new = kmem_cache_alloc(rfs_inode_cachep, GFP_KERNEL);
- +#else
- new = kmem_cache_alloc(rfs_inode_cachep, SLAB_KERNEL);
- +#endif
- if (!new)
- return NULL;
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/file.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/file.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/file.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -33,6 +33,8 @@
- #include "rfs.h"
- #include "log.h"
- +#include "xattr.h"
- +
- #ifdef CONFIG_GCOV_PROFILE
- #define loff_t off_t
- #endif
- @@ -498,7 +500,11 @@
- * System file (log or pool file) can not be accessed
- */
- #ifdef RFS_FOR_2_6
- +#ifdef RFS_FOR_2_6_27
- +int rfs_permission(struct inode *inode, int mode)
- +#else
- int rfs_permission(struct inode *inode, int mode, struct nameidata *nd)
- +#endif
- #else
- int rfs_permission(struct inode *inode, int mode)
- #endif
- @@ -530,7 +536,11 @@
- ssize_t ret;
- int err;
- +#ifdef RFS_FOR_2_6_19
- + ret = do_sync_write(file, buf, count, ppos);
- +#else
- ret = generic_file_write(file, buf, count, ppos);
- +#endif
- if (ret <= 0)
- return ret;
- @@ -590,7 +600,13 @@
- #endif
- struct file_operations rfs_file_operations = {
- +#ifdef RFS_FOR_2_6_19
- + .read = do_sync_read,
- + .aio_read = generic_file_aio_read,
- + .aio_write = generic_file_aio_write,
- +#else
- .read = generic_file_read,
- +#endif
- .write = rfs_file_write,
- .mmap = generic_file_mmap,
- .fsync = rfs_file_fsync,
- @@ -603,6 +619,13 @@
- .truncate = rfs_truncate,
- .permission = rfs_permission,
- .setattr = rfs_setattr,
- +#ifdef CONFIG_RFS_FS_XATTR
- + .setxattr = rfs_xattr_set,
- + .getxattr = rfs_xattr_get,
- + .listxattr = rfs_xattr_list,
- + .removexattr = rfs_xattr_delete,
- +#endif
- +// .check_acl = generic_check_acl,
- };
- /**
- @@ -660,7 +683,7 @@
- if (ret) {
- RFS_I(inode)->mmu_private -= sb->s_blocksize;
- RFS_BUG("iblock(%ld) doesn't have a physical mapping",
- - iblock);
- + (long int)iblock);
- goto out;
- }
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/cluster.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/cluster.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/cluster.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -442,7 +442,7 @@
- if (next < VALID_CLU) { /* out-of-range input */
- fat_unlock(sb);
- - RFS_BUG("fat entry(%u) was corrupted\n", next);
- + RFS_BUG("fat entry(%u) was corrupted\nTry to repair your partition with: fsck.vfat -a\n", next);
- return -EIO;
- }
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Makefile.26
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Makefile.26 (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Makefile.26 (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -2,9 +2,22 @@
- # Makefile for the linux rfs-filesystem (kernel 2.6)
- #
- -obj-$(CONFIG_RFS_FS) += rfs.o
- +obj-$(CONFIG_RFS_FS) += rfs.o
- -rfs-y += cluster.o code_convert.o dos.o
- -rfs-y += dir.o file.o inode.o namei.o super.o
- -rfs-y += log.o log_replay.o
- -rfs-y += rfs_26.o
- +rfs-y += fcache.o cluster.o code_convert.o dos.o
- +rfs-y += dir.o file.o inode_26.o inode.o namei.o super.o
- +rfs-y += log.o log_replay.o
- +rfs-y += rfs_26.o
- +#ifdef CONFIG_PROC_FS
- +rfs-y += misc.o
- +#endif
- +ifdef CONFIG_RFS_FS_XATTR
- + rfs-y += xattr.o xattr_user.o xattr_trusted.o
- +endif
- +#ifdef CONFIG_RFS_FS_POSIX_ACL
- +rfs-y +=
- +#endif
- +ifdef CONFIG_RFS_FS_SECURITY
- + rfs-y += xattr_security.o
- +endif
- +
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/dos.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/dos.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/dos.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -153,7 +153,7 @@
- * @param i offset of target bit
- * @return none
- */
- -static inline void bitmap_set(unsigned char *bitmap, int i)
- +static inline void rfs_bitmap_set(unsigned char *bitmap, int i)
- {
- bitmap[i >> 3] |= (0x01 << (i & 0x7));
- }
- @@ -282,7 +282,7 @@
- int err = 0;
- bitmap_clear_all(bmap, (MAX_NUMERIC >> 3));
- - bitmap_set(bmap, 0);
- + rfs_bitmap_set(bmap, 0);
- while (1) {
- ep = get_entry(dir, cpos++, &bh);
- @@ -318,7 +318,7 @@
- }
- if (count)
- - bitmap_set(bmap, count);
- + rfs_bitmap_set(bmap, count);
- }
- for (count = 0, i = 0; (!count) && (i < (MAX_NUMERIC >> 3)); i++) {
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/namei.c
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/namei.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/namei.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -27,10 +27,12 @@
- #include <linux/fs.h>
- #include <linux/rfs_fs.h>
- #include <linux/sched.h>
- -
- +
- #include "rfs.h"
- #include "log.h"
- +#include "xattr.h"
- +
- #define SLASH '/'
- #define ROOT_MTIME(sb) (sb->s_root->d_inode->i_mtime)
- @@ -1089,5 +1091,12 @@
- .rename = rfs_rename,
- .permission = rfs_permission,
- .setattr = rfs_setattr,
- +#ifdef CONFIG_RFS_FS_XATTR
- + .setxattr = rfs_xattr_set,
- + .getxattr = rfs_xattr_get,
- + .listxattr = rfs_xattr_list,
- + .removexattr = rfs_xattr_delete,
- +#endif
- +// .check_acl = generic_check_acl,
- };
- Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Config.in
- ===================================================================
- --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Config.in (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
- +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Config.in (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
- @@ -26,7 +26,7 @@
- fi
- define_bool CONFIG_RFS_IGET4 y
- -define_string CONFIG_RFS_VERSION "1.2.2p1-rc2"
- +define_string CONFIG_RFS_VERSION "RFS_1.3.1_b070"
- # When file is extended, it is the max number of clusters
- # which one transaction can use.
- Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs
- ___________________________________________________________________
- Hinzugefügt: svn:mergeinfo
- Zusammengeführt /RFS/RFS_1.2.2p1-rc2_kernel_m64/fs/rfs:r1230-1267
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement