Advertisement
Guest User

SamyGO rfs patch against sources from kernel_64m.tgz partial xattr functions and mount options

a guest
Feb 15th, 2011
1,068
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 59.67 KB | None | 0 0
  1. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt
  2. ===================================================================
  3. --- 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)
  4. +++ 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)
  5. @@ -0,0 +1,120 @@
  6. +------------------------------------------------------------------------
  7. +r1272 | arris | 2011-02-13 14:11:35 +0100 (So, 13. Feb 2011) | 1 Zeile
  8. +
  9. +some dummy stuff for xattr and for mount options
  10. +------------------------------------------------------------------------
  11. +r1270 | arris | 2011-02-12 17:26:06 +0100 (Sa, 12. Feb 2011) | 1 Zeile
  12. +
  13. +version with mstar headers
  14. +------------------------------------------------------------------------
  15. +r1269 | arris | 2011-02-12 17:22:06 +0100 (Sa, 12. Feb 2011) | 1 Zeile
  16. +
  17. +xattr dummy functions added
  18. +------------------------------------------------------------------------
  19. +r1268 | arris | 2011-02-12 15:25:09 +0100 (Sa, 12. Feb 2011) | 1 Zeile
  20. +
  21. +merge from 1.2.3
  22. +------------------------------------------------------------------------
  23. +r1263 | arris | 2011-02-08 22:07:08 +0100 (Di, 08. Feb 2011) | 1 Zeile
  24. +
  25. +nick fixed
  26. +------------------------------------------------------------------------
  27. +r1258 | arris | 2011-02-07 20:15:13 +0100 (Mo, 07. Feb 2011) | 4 Zeilen
  28. +
  29. +adapt fixes for UExxB7020
  30. +need also patch in drivers/fsr/Kconfig:
  31. +config RFS_STL_DELETE drop MAPDESROY selection!!!
  32. +
  33. +------------------------------------------------------------------------
  34. +r1257 | arris | 2011-02-07 18:02:46 +0100 (Mo, 07. Feb 2011) | 1 Zeile
  35. +
  36. +synced fix for 2.6.34, kmalloc gone to slab.h
  37. +------------------------------------------------------------------------
  38. +r1255 | arris | 2011-02-06 21:01:15 +0100 (So, 06. Feb 2011) | 1 Zeile
  39. +
  40. +initial fixes for SamyGO port
  41. +------------------------------------------------------------------------
  42. +r1254 | arris | 2011-02-06 20:48:13 +0100 (So, 06. Feb 2011) | 1 Zeile
  43. +
  44. +initial fixes for SamyGO port
  45. +------------------------------------------------------------------------
  46. +r1253 | arris | 2011-02-06 19:58:03 +0100 (So, 06. Feb 2011) | 1 Zeile
  47. +
  48. +initial fixes for SamyGO port
  49. +------------------------------------------------------------------------
  50. +r1247 | arris | 2011-02-06 18:42:02 +0100 (So, 06. Feb 2011) | 1 Zeile
  51. +
  52. +2.6.33 bitmap_set function name conflict with new kernel function
  53. +------------------------------------------------------------------------
  54. +r1245 | arris | 2011-02-06 17:55:32 +0100 (So, 06. Feb 2011) | 1 Zeile
  55. +
  56. +partial prepare for future functions
  57. +------------------------------------------------------------------------
  58. +r1244 | arris | 2011-02-06 16:05:43 +0100 (So, 06. Feb 2011) | 1 Zeile
  59. +
  60. +initial fixes for SamyGO port
  61. +------------------------------------------------------------------------
  62. +r1243 | arris | 2011-02-06 15:27:51 +0100 (So, 06. Feb 2011) | 1 Zeile
  63. +
  64. +2.6.33 raise version, bmap changes in kernel 2.6.33
  65. +------------------------------------------------------------------------
  66. +r1242 | arris | 2011-02-06 15:19:29 +0100 (So, 06. Feb 2011) | 1 Zeile
  67. +
  68. +2.6.27 2.6.28 2.6.29 2.6.30 2.6.31 2.6.32 ok
  69. +------------------------------------------------------------------------
  70. +r1241 | arris | 2011-02-06 12:01:41 +0100 (So, 06. Feb 2011) | 1 Zeile
  71. +
  72. +nothing function dependend
  73. +------------------------------------------------------------------------
  74. +r1240 | arris | 2011-02-06 10:39:35 +0100 (So, 06. Feb 2011) | 1 Zeile
  75. +
  76. +2.6.27 rfs_permission arguments changed, added (incomplete) Documentation/README-RFS-SamyGO-port.txt
  77. +------------------------------------------------------------------------
  78. +r1239 | arris | 2011-02-06 09:21:55 +0100 (So, 06. Feb 2011) | 1 Zeile
  79. +
  80. +2.6.24-rt1 CONFIG_PREEMPT(_RT) fix
  81. +------------------------------------------------------------------------
  82. +r1238 | arris | 2011-02-06 08:38:24 +0100 (So, 06. Feb 2011) | 1 Zeile
  83. +
  84. +2.6.24 rfs_prepare_write rfs_commit_write replaced by rfs_write_begin rfs_write_end, added missing cast
  85. +------------------------------------------------------------------------
  86. +r1237 | arris | 2011-02-06 08:27:40 +0100 (So, 06. Feb 2011) | 1 Zeile
  87. +
  88. +2.6.24 rfs_prepare_write rfs_commit_write replaced by rfs_write_begin rfs_write_end
  89. +------------------------------------------------------------------------
  90. +r1236 | arris | 2011-02-05 16:17:17 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  91. +
  92. +2.6.23 kmem_cache_create argument count changed, added SLAB_MEM_SPREAD flags too
  93. +------------------------------------------------------------------------
  94. +r1235 | arris | 2011-02-05 15:43:10 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  95. +
  96. +2.6.22 SLAB_CTOR_* gone
  97. +------------------------------------------------------------------------
  98. +r1234 | arris | 2011-02-05 14:24:54 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  99. +
  100. +2.6.20 SLAB_KERNEL gone, kmem_cache_t to struct kmem_cache, added more info to RFS_BUG in cluster.c, missed newline
  101. +------------------------------------------------------------------------
  102. +r1233 | arris | 2011-02-05 14:21:34 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  103. +
  104. +2.6.20 SLAB_KERNEL gone, kmem_cache_t to struct kmem_cache, added more info to RFS_BUG in cluster.c
  105. +------------------------------------------------------------------------
  106. +r1232 | arris | 2011-02-05 13:37:57 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  107. +
  108. +define fix for later comming kernel
  109. +------------------------------------------------------------------------
  110. +r1231 | arris | 2011-02-05 12:21:19 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  111. +
  112. +2.6.19 generic_file_read generic_file_write gone
  113. +------------------------------------------------------------------------
  114. +r1230 | arris | 2011-02-05 10:02:30 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  115. +
  116. +initial fixes for SamyGO port
  117. +------------------------------------------------------------------------
  118. +r1229 | arris | 2011-02-04 18:45:04 +0100 (Fr, 04. Feb 2011) | 1 Zeile
  119. +
  120. +added tree for patch generation from svn
  121. +------------------------------------------------------------------------
  122. +r1222 | arris | 2011-02-02 16:10:17 +0100 (Mi, 02. Feb 2011) | 1 Zeile
  123. +
  124. +added initial RFS sources from kernel_64m
  125. +------------------------------------------------------------------------
  126.  
  127. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt
  128. ___________________________________________________________________
  129. Hinzugefügt: svn:eol-style
  130. + native
  131.  
  132. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs_i.h
  133. ===================================================================
  134. --- 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)
  135. +++ 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)
  136. @@ -32,6 +32,16 @@
  137. * RFS file system inode data in memory (in-core)
  138. */
  139.  
  140. +#ifdef CONFIG_RFS_FAST_SEEK /* needs implementation, arris */
  141. +struct fast_seek_info {
  142. + unsigned int interval;
  143. + unsigned int interval_bits;
  144. + unsigned int interval_mask;
  145. + unsigned int num_fpoints;
  146. + unsigned int *fpoints;
  147. +};
  148. +#endif
  149. +
  150. struct rfs_inode_info {
  151. __u32 start_clu; /* start cluster of inode */
  152. __u32 p_start_clu; /* parent directory start cluster */
  153. @@ -39,6 +49,23 @@
  154. __u32 last_clu; /* last cluster number */
  155. __u8 i_state; /* rfs-specific inode state */
  156.  
  157. +#ifdef CONFIG_RFS_FS_XATTR /* needs implementation, arris */
  158. + __u32 xattr_start_clus; /* xattr start cluster */
  159. + __u32 xattr_last_clus; /* xattr last cluster */
  160. + __u32 xattr_numof_clus; /* xattr number of cluster */
  161. + __u16 xattr_ctime; /* xattr create time */
  162. + __u16 xattr_cdate; /* xattr create date */
  163. +
  164. + __u16 xattr_valid_count; /* valid attribute count */
  165. + __u32 xattr_total_space; /* used space(including deleted entry)*/
  166. + __u32 xattr_used_space; /* used space (except deleted entry) */
  167. + uid_t xattr_uid;
  168. + gid_t xattr_gid;
  169. + umode_t xattr_mode;
  170. +
  171. + struct rw_semaphore xattr_sem; /* xattr semaphore */
  172. +#endif
  173. +
  174. /* hint for quick search */
  175. __u32 hint_last_clu;
  176. __u32 hint_last_offset;
  177. @@ -47,6 +74,12 @@
  178. unsigned long trunc_start;
  179.  
  180. spinlock_t write_lock;
  181. +
  182. +#ifdef CONFIG_RFS_FAST_SEEK /* needs implementation, arris */
  183. + /* fast seek info */
  184. + struct fast_seek_info *fast_seek;
  185. +#endif
  186. +
  187. #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
  188. /* total block size that inode allocated */
  189. loff_t mmu_private;
  190. @@ -60,6 +93,10 @@
  191. struct timer_list timer;
  192. struct task_struct *sleep_proc;
  193. #endif
  194. +
  195. +#ifdef CONFIG_RFS_FAST_LOOKUP /* needs implementation, arris */
  196. + __u8 fast; /* set if the file is opened with fast lookup option */
  197. +#endif
  198. };
  199.  
  200. /* get inode info */
  201. @@ -75,5 +112,6 @@
  202. /* rfs-specific inode state */
  203. #define RFS_I_ALLOC 0x00
  204. #define RFS_I_FREE 0x01
  205. +#define RFS_I_MODIFIED 0x02
  206.  
  207. #endif
  208. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs.h
  209. ===================================================================
  210. --- 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)
  211. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs.h (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  212. @@ -175,10 +175,34 @@
  213. (((x - VALID_CLU) << RFS_SB(sb)->blks_per_clu_bits) + \
  214. RFS_SB(sb)->data_start)
  215.  
  216. +#define SET_XATTR_START_CLUSTER(x, xattr_start_clu) \
  217. +do { \
  218. + SET16((x)->ctime, (__u16)(xattr_start_clu & 0x0FFFF)); \
  219. + SET16((x)->cdate, (__u16)(xattr_start_clu >> 16)); \
  220. +} while (0)
  221. +
  222. #define IS_FREE(name) (((name[0] == DELETE_MARK) || (name[0] == 0x0))? 1 : 0 )
  223.  
  224. #define IS_XSR(x) (MAJOR(x) == XSR_BLK_DEVICE_FTL ? 1 : 0)
  225. -
  226. +
  227. +#ifdef _RFS_INTERNAL_QUOTA
  228. +/* Mount flags */
  229. +#define RFS_MOUNT_USRQUOTA 0x01
  230. +#define RFS_MOUNT_GRPQUOTA 0x02
  231. +#endif
  232. +#define RFS_MOUNT_EA 0x04
  233. +#define RFS_MOUNT_CHECK_NO 0x08
  234. +#define RFS_MOUNT_CHECK_STRICT 0x10
  235. +
  236. +/* #define RFS_MOUNT_POSIX_ACL 0x10 */
  237. +#define RFS_MOUNT_XATTR_USER 0x04000 /* Extended user attributes */
  238. +
  239. +#define clear_opt(o, opt) (o &= ~RFS_MOUNT_##opt)
  240. +#define set_opt(o, opt) (o |= RFS_MOUNT_##opt)
  241. +#define test_opt(sb, opt) (RFS_SB(sb)->options.opts & \
  242. + RFS_MOUNT_##opt)
  243. +
  244. +
  245. /* function macro */
  246. #ifdef CONFIG_RFS_VFAT
  247. #define find_entry find_entry_long
  248. @@ -264,14 +288,26 @@
  249. union {
  250. struct {
  251. u8 ext_bpb[26];
  252. - u8 boot_code[446];
  253. +#ifdef CONFIG_RFS_FS_XATTR
  254. + u8 boot_code[440];
  255. +#else
  256. + u8 boot_code[446];
  257. +#endif
  258. } fat16;
  259. struct {
  260. u8 bpb[28];
  261. u8 ext_bpb[26];
  262. - u8 boot_code[418];
  263. +#ifdef CONFIG_RFS_FS_XATTR
  264. + u8 boot_code[412];
  265. +#else
  266. + u8 boot_code[418];
  267. +#endif
  268. } fat32;
  269. } u;
  270. +#ifdef CONFIG_RFS_FS_XATTR
  271. + u16 xattr_root_flag;
  272. + u32 xattr_start_clus;
  273. +#endif
  274. u8 boot_code[2];
  275. u16 signature;
  276. } __attribute__ ((packed));
  277. @@ -397,7 +433,11 @@
  278. int rfs_bmap (struct inode *, long, unsigned long *);
  279. #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
  280. int rfs_get_block (struct inode *, sector_t, struct buffer_head *, int);
  281. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
  282. +int rfs_permission (struct inode *, int);
  283. +#else
  284. int rfs_permission (struct inode *, int, struct nameidata *);
  285. +#endif
  286. #else
  287. int rfs_get_block (struct inode *, long, struct buffer_head *, int);
  288. int rfs_permission (struct inode *, int);
  289. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/include/linux/rfs_fs_sb.h
  290. ===================================================================
  291. --- 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)
  292. +++ 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)
  293. @@ -26,7 +26,12 @@
  294. #ifndef _LINUX_RFS_FS_SB
  295. #define _LINUX_RFS_FS_SB
  296.  
  297. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
  298. +#include <linux/semaphore.h>
  299. +#else
  300. #include <asm/semaphore.h>
  301. +#endif
  302. +
  303. /*
  304. * RFS file system superblock data in memory(in-core)
  305. */
  306. @@ -35,6 +40,7 @@
  307. struct rfs_mount_info {
  308. char *codepage;
  309. __u32 isvfat;
  310. + __u32 opts; /* needs implementation, arris, partial done */
  311. };
  312.  
  313. /* rfs private data structure of sb */
  314. @@ -74,6 +80,10 @@
  315. /* hint info for fast unlink */
  316. void *pool_info;
  317.  
  318. + /* CONFIG_RFS_RDONLY_MOUNT */ /* needs implementation, arris */
  319. + __u32 use_log;
  320. + __u32 use_pool;
  321. +
  322. /* chunk list for map destroy */
  323. struct list_head free_chunks;
  324.  
  325. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c
  326. ===================================================================
  327. --- 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)
  328. +++ 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)
  329. @@ -0,0 +1,76 @@
  330. +/* file for future usage, by arris */
  331. +/*
  332. + * linux/fs/rfs/xattr_user.c
  333. + * Handler for extended user attributes.
  334. + *
  335. + */
  336. +
  337. +/* #include <linux/module.h>
  338. +#include <linux/string.h>
  339. +#include <linux/fs.h> */
  340. +#include <linux/xattr.h>
  341. +
  342. +#include <linux/rfs_fs.h>
  343. +#include "rfs.h"
  344. +#include "xattr.h"
  345. +
  346. + static size_t
  347. +rfs_xattr_user_list(struct dentry *dentry, char *list, size_t list_size,
  348. + const char *name, size_t name_len, int type)
  349. +{
  350. + const size_t prefix_len = XATTR_USER_PREFIX_LEN;
  351. + const size_t total_len = prefix_len + name_len + 1;
  352. +
  353. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  354. +
  355. + if (!test_opt(dentry->d_sb, XATTR_USER))
  356. + return 0;
  357. +
  358. + if (list && total_len <= list_size) {
  359. + memcpy(list, XATTR_USER_PREFIX, prefix_len);
  360. + memcpy(list+prefix_len, name, name_len);
  361. + list[prefix_len + name_len] = '\0';
  362. + }
  363. + return total_len;
  364. +}
  365. +
  366. + static int
  367. +rfs_xattr_user_get(struct dentry *dentry, const char *name,
  368. + void *buffer, size_t size, int type)
  369. +{
  370. + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
  371. +
  372. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  373. +
  374. + if (strcmp(name, "") == 0)
  375. + return -EINVAL;
  376. + if (!test_opt(dentry->d_sb, XATTR_USER))
  377. + return -EOPNOTSUPP;
  378. +
  379. + /* memcpy name etc to param? arris */
  380. + return rfs_xattr_get(dentry->d_inode, param, (unsigned int *)type);
  381. +}
  382. +
  383. + static int
  384. +rfs_xattr_user_set(struct dentry *dentry, const char *name,
  385. + const void *value, size_t size, int flags, int type)
  386. +{
  387. + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
  388. +
  389. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  390. +
  391. + if (strcmp(name, "") == 0)
  392. + return -EINVAL;
  393. + if (!test_opt(dentry->d_sb, XATTR_USER))
  394. + return -EOPNOTSUPP;
  395. +
  396. + /* memcpy name etc to param? arris */
  397. + return rfs_xattr_set(dentry->d_inode, param);
  398. +}
  399. +
  400. +struct xattr_handler rfs_xattr_user_handler = {
  401. + .prefix = XATTR_USER_PREFIX,
  402. + .list = rfs_xattr_user_list,
  403. + .get = rfs_xattr_user_get,
  404. + .set = rfs_xattr_user_set,
  405. +};
  406.  
  407. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c
  408. ___________________________________________________________________
  409. Hinzugefügt: svn:eol-style
  410. + native
  411.  
  412. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.c
  413. ===================================================================
  414. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
  415. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
  416. @@ -0,0 +1,110 @@
  417. +/* file for future usage, by arris */
  418. +
  419. +#include <linux/rfs_fs.h>
  420. +
  421. +#include "xattr.h"
  422. +
  423. +static struct xattr_handler *rfs_xattr_handler_map[] = {
  424. + [RFS_XATTR_NS_USER] = &rfs_xattr_user_handler,
  425. +#ifdef CONFIG_RFS_FS_POSIX_ACL
  426. + [RFS_XATTR_NS_POSIX_ACL_ACCESS] = &rfs_xattr_acl_access_handler,
  427. + [RFS_XATTR_NS_POSIX_ACL_DEFAULT] = &rfs_xattr_acl_default_handler,
  428. +#endif
  429. + [RFS_XATTR_NS_TRUSTED] = &rfs_xattr_trusted_handler,
  430. +#ifdef CONFIG_RFS_FS_SECURITY
  431. + [RFS_XATTR_NS_SECURITY] = &rfs_xattr_security_handler,
  432. +#endif
  433. +};
  434. +
  435. +struct xattr_handler *rfs_xattr_handlers[] = {
  436. + &rfs_xattr_user_handler,
  437. + &rfs_xattr_trusted_handler,
  438. +#ifdef CONFIG_RFS_FS_POSIX_ACL
  439. + &rfs_xattr_acl_access_handler,
  440. + &rfs_xattr_acl_default_handler,
  441. +#endif
  442. +#ifdef CONFIG_RFS_FS_SECURITY
  443. + &rfs_xattr_security_handler,
  444. +#endif
  445. + NULL
  446. +};
  447. +
  448. +static inline struct xattr_handler *rfs_xattr_handler(int name_index)
  449. +{
  450. + struct xattr_handler *handler = NULL;
  451. +
  452. + if (name_index > 0 && name_index < ARRAY_SIZE(rfs_xattr_handler_map))
  453. + handler = rfs_xattr_handler_map[name_index];
  454. + return handler;
  455. +}
  456. +
  457. +int rfs_xattr_get(struct inode *inode, struct rfs_xattr_param *param, unsigned int *dummy){
  458. + int err = 0;
  459. +
  460. + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)&param->name);
  461. +
  462. +// down_read(&RFS_I(dentry->d_inode)->xattr_sem);
  463. +
  464. +// up_read(&RFS_I(dentry->d_inode)->xattr_sem);
  465. +
  466. + return err;
  467. +}
  468. +
  469. +int rfs_do_xattr_set(struct inode *inode, struct rfs_xattr_param *param){
  470. + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)&param->name);
  471. + return 0;
  472. +}
  473. +
  474. +int rfs_xattr_set(struct inode *inode, struct rfs_xattr_param *param){
  475. + int err = 0;
  476. +
  477. + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)&param->name);
  478. +
  479. +// down_write(&RFS_I(dentry->d_inode)->xattr_sem);
  480. + err = rfs_do_xattr_set(inode, param);
  481. +// up_write(&RFS_I(dentry->d_inode)->xattr_sem);
  482. +
  483. + return err;
  484. +}
  485. +
  486. +int rfs_do_xattr_delete(struct inode *inode, struct rfs_xattr_param *param){
  487. + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)&param->name);
  488. + return 0;
  489. +}
  490. +
  491. +int rfs_xattr_delete(struct inode *inode, struct rfs_xattr_param *param){
  492. + int err = 0;
  493. +
  494. + printk(KERN_INFO "[rfs_xattr] %s name %s\n", __FUNCTION__,(char *)&param->name);
  495. +
  496. + err = rfs_do_xattr_delete(inode, param);
  497. +
  498. + return err;
  499. +}
  500. +
  501. +ssize_t rfs_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size){
  502. + int err = 0;
  503. +
  504. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  505. +
  506. +// down_read(&RFS_I(dentry->d_inode)->xattr_sem);
  507. +
  508. +// up_read(&RFS_I(dentry->d_inode)->xattr_sem);
  509. +
  510. + return err;
  511. +}
  512. +
  513. +int rfs_xattr_read_header_to_inode(struct inode *inode, int b){
  514. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  515. + return 0;
  516. +}
  517. +
  518. +int rfs_xattr_write_header(struct inode *inode){
  519. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  520. + return 0;
  521. +}
  522. +
  523. +int __xattr_io(int a, struct inode *inode, unsigned long c, char *buffer, unsigned int buffer_size){
  524. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  525. + return 0;
  526. +}
  527.  
  528. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.c
  529. ___________________________________________________________________
  530. Hinzugefügt: svn:eol-style
  531. + native
  532.  
  533. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode_26.c
  534. ===================================================================
  535. --- 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)
  536. +++ 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)
  537. @@ -0,0 +1,2 @@
  538. +/* file for future usage, by arris */
  539. +
  540.  
  541. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode_26.c
  542. ___________________________________________________________________
  543. Hinzugefügt: svn:eol-style
  544. + native
  545.  
  546. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.h
  547. ===================================================================
  548. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.h (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
  549. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.h (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
  550. @@ -0,0 +1,212 @@
  551. +/*
  552. + *---------------------------------------------------------------------------*
  553. + * *
  554. + * COPYRIGHT 2003-2009 SAMSUNG ELECTRONICS CO., LTD. *
  555. + * ALL RIGHTS RESERVED *
  556. + * *
  557. + * Permission is hereby granted to licensees of Samsung Electronics *
  558. + * Co., Ltd. products to use or abstract this computer program only in *
  559. + * accordance with the terms of the NAND FLASH MEMORY SOFTWARE LICENSE *
  560. + * AGREEMENT for the sole purpose of implementing a product based on *
  561. + * Samsung Electronics Co., Ltd. products. No other rights to reproduce, *
  562. + * use, or disseminate this computer program, whether in part or in *
  563. + * whole, are granted. *
  564. + * *
  565. + * Samsung Electronics Co., Ltd. makes no representation or warranties *
  566. + * with respect to the performance of this computer program, and *
  567. + * specifically disclaims any responsibility for any damages, *
  568. + * special or consequential, connected with the use of this program. *
  569. + * *
  570. + *---------------------------------------------------------------------------*
  571. +*/
  572. +/**
  573. + * @version RFS_1.3.1_b070_RTM
  574. + * @file fs/rfs/xattr.h
  575. + * @brief local header file for xattr
  576. + *
  577. + *
  578. + */
  579. +#include "rfs.h"
  580. +#ifndef _XATTR_H
  581. +#define _XATTR_H
  582. +
  583. +#define RFS_XATTR_HEAD_SIGNATURE ((__u16)(0x1097))
  584. +#define RFS_XATTR_ENTRY_SIGNATURE ((__u16)(0xA5A5))
  585. +#define ENOATTR ENODATA
  586. +#define EFULLATTR ENOTEMPTY
  587. +
  588. +/****************************************
  589. + * configuration of Extended Attribute
  590. + ****************************************/
  591. +/* the maximum byte size of name */
  592. +#define RFS_XATTR_NAME_LENGTH_MAX XATTR_NAME_MAX
  593. +/* the maximum byte size of value */
  594. +#define RFS_XATTR_VALUE_LENGTH_MAX XATTR_SIZE_MAX
  595. +/* the maximum number of extended attributes */
  596. +#define RFS_XATTR_ENTRY_NUMBER_MAX 128
  597. +/* the maximum byte size of total extended attributes */
  598. +#define RFS_XATTR_LIST_SIZE_MAX (64 * 1024)
  599. +
  600. +/* Threshold size of xattr compaction. refer __xattr_compaction().*/
  601. +#define XATTR_COMPACTION_THRESHOLD (RFS_XATTR_LIST_SIZE_MAX << 1)
  602. +
  603. +/****************************************
  604. + * marco define for Extended Attribute
  605. + ****************************************/
  606. +#define IS_XATTR_EXIST(rii) ((rii)->xattr_start_clus != CLU_TAIL)
  607. +#define IS_USED_XATTR_ENTRY(flag) ((flag) == XATTR_ENTRY_USED)
  608. +#define IS_DELETE_XATTR_ENTRY(flag) ((flag) == XATTR_ENTRY_DELETE)
  609. +
  610. +
  611. +/****************************************
  612. + * type define for Extended Attribute
  613. + ****************************************/
  614. +extern struct xattr_handler *rfs_xattr_handlers[];
  615. +
  616. +typedef unsigned int XATTR_NS; /* XATTR_NAMESPACE_ID */
  617. +enum _XATTR_NAMESPACE_ID
  618. +{
  619. + RFS_XATTR_NS_USER = 1,
  620. + RFS_XATTR_NS_POSIX_ACL_ACCESS = 2,
  621. + RFS_XATTR_NS_POSIX_ACL_DEFAULT = 3,
  622. + RFS_XATTR_NS_TRUSTED = 4,
  623. + RFS_XATTR_NS_SECURITY = 5
  624. +};
  625. +
  626. +/* Flags for extended attribute set operation */
  627. +typedef int XATTR_SET_FLAG;
  628. +enum _XATTR_SET_FLAG
  629. +{
  630. +/* if ATTR already exists, replace and if doesn't exist, create */
  631. + XATTR_SET_FLAG_NONE = 0x0000,
  632. +/* if ATTR already exists, fail */
  633. + XATTR_SET_FLAG_CREATE = 0x0001,
  634. +/* if ATTR does not exist, fail */
  635. + XATTR_SET_FLAG_REPLACE = 0x0002,
  636. + XATTR_SET_FLAG_DUMMY = 0x7FFFFFFF
  637. +};
  638. +
  639. +/* flag for xattr entry status */
  640. +typedef signed int XATTR_ENTRY_FLAG;
  641. +enum _XATTR_ENTRY_FLAG
  642. +{
  643. + XATTR_ENTRY_NONE = 0x00, /* no flag */
  644. + XATTR_ENTRY_USED = 0x01, /* used mark */
  645. + XATTR_ENTRY_DELETE = 0x02, /* delete mark */
  646. + XATTR_ENTRY_DUMMY = 0x7FFFFFFF
  647. +};
  648. +
  649. +/* xattr header struct */
  650. +/* [Caution] sizeof(rfs_xattr_header) should be 64byte */
  651. +struct rfs_xattr_header
  652. +{
  653. + __u16 signature; /* signature of header*/
  654. + __u16 ctime; /* create time of directory entry */
  655. + __u16 cdate; /* create date of directriy entry */
  656. + __u16 mode; /* mode */
  657. + __u32 uid; /* user id */
  658. + __u32 gid; /* group id */
  659. + __u16 valid_count; /* valid attribute count */
  660. + __u16 reserv1; /* reservation field 1 */
  661. + __u32 total_space; /* used space (including deleted entry) */
  662. + __u32 used_space; /* used space (except deleted entry) */
  663. + __u32 numof_clus; /* number of allocated cluster */
  664. + __u32 pdir; /* parent directory' start cluster */
  665. + __u32 entry; /* directory index in pdir */
  666. + __u32 reserv2[6]; /* reservation field 2 */
  667. +} __attribute__ ((packed));
  668. +
  669. +/* xattr entry struct */
  670. +/* [Caution] sizeof(rfs_xattr_entry) should be 32byte */
  671. +struct rfs_xattr_entry {
  672. + __u8 type_flag; /* EA entry type flag */
  673. + __u8 ns_id; /* EA name space id */
  674. + __u16 name_length; /* EA name length (byte unit) */
  675. + __u32 value_length; /* EA value length (byte unit) */
  676. + __u32 entry_length; /* EA entry length (byte unit)
  677. + * rfs_xattr_entry + name + value + padding
  678. + * entray_length align to 32byte */
  679. + __u16 crc16; /* crc16 check sum (optional) */
  680. + __u32 reserv[4]; /* reservation field */
  681. + __u16 signature; /* signature of entry header */
  682. +} __attribute__ ((packed));
  683. +
  684. +/* structure for ea parameter (in-memory struct) */
  685. +struct rfs_xattr_param
  686. +{
  687. + /* extended attribute name or list of name */
  688. + char *name;
  689. + /* name length */
  690. + unsigned int name_length;
  691. +
  692. + /* extended attribute value */
  693. + void *value;
  694. +
  695. + /* buffer size for extended attribute value or list */
  696. + /* if size is 0, size of buffer or list will be returned */
  697. + unsigned int value_length;
  698. +
  699. + /* namespace id of extended attribute name */
  700. + XATTR_NS id;
  701. +
  702. + /* extended attribute set flag */
  703. + XATTR_SET_FLAG set_flag;
  704. +};
  705. +
  706. +extern struct xattr_handler rfs_xattr_user_handler;
  707. +extern struct xattr_handler rfs_xattr_trusted_handler;
  708. +#ifdef CONFIG_RFS_FS_POSIX_ACL
  709. +extern struct xattr_handler rfs_xattr_acl_access_handler;
  710. +extern struct xattr_handler rfs_xattr_acl_default_handler;
  711. +#endif
  712. +#ifdef CONFIG_RFS_FS_SECURITY
  713. +extern struct xattr_handler rfs_xattr_security_handler;
  714. +#endif
  715. +
  716. +/*********************************************
  717. + * function prototypes for Extended Attribute
  718. + *********************************************/
  719. +extern int
  720. +rfs_xattr_get(struct inode *, struct rfs_xattr_param *, unsigned int *);
  721. +
  722. +extern int
  723. +rfs_do_xattr_set(struct inode *, struct rfs_xattr_param *);
  724. +extern int
  725. +rfs_xattr_set(struct inode *, struct rfs_xattr_param *);
  726. +
  727. +extern int
  728. +rfs_do_xattr_delete(struct inode *, struct rfs_xattr_param *);
  729. +extern int
  730. +rfs_xattr_delete(struct inode *, struct rfs_xattr_param *);
  731. +
  732. +extern ssize_t
  733. +rfs_xattr_list(struct dentry *, char *, size_t);
  734. +
  735. +extern int
  736. +rfs_xattr_read_header_to_inode(struct inode *, int);
  737. +
  738. +extern int
  739. +rfs_xattr_write_header(struct inode *);
  740. +
  741. +extern int
  742. +__xattr_io(int, struct inode *, unsigned long, char *, unsigned int);
  743. +
  744. +#ifdef CONFIG_RFS_FS_SECURITY
  745. +extern int rfs_init_security(struct inode *inode, struct inode *dir);
  746. +#else
  747. +static inline int rfs_init_security(struct inode *inode, struct inode *dir)
  748. +{
  749. + return 0;
  750. +}
  751. +#endif
  752. +#ifdef CONFIG_RFS_FS_FULL_PERMISSION
  753. +extern int
  754. +rfs_do_xattr_set_guidmode(struct inode *, uid_t *, gid_t *, umode_t *);
  755. +
  756. +extern int
  757. +rfs_xattr_set_guidmode(struct inode *, uid_t *, gid_t *, umode_t *);
  758. +
  759. +extern int
  760. +rfs_xattr_get_guidmode(struct inode *, uid_t *, gid_t *, umode_t *);
  761. +#endif
  762. +#endif /* _XATTR_H */
  763.  
  764. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr.h
  765. ___________________________________________________________________
  766. Hinzugefügt: svn:eol-style
  767. + native
  768.  
  769. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/fcache.c
  770. ===================================================================
  771. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/fcache.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
  772. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/fcache.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
  773. @@ -0,0 +1 @@
  774. +/* file for future usage, by arris */
  775.  
  776. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/fcache.c
  777. ___________________________________________________________________
  778. Hinzugefügt: svn:eol-style
  779. + native
  780.  
  781. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c
  782. ===================================================================
  783. --- 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)
  784. +++ 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)
  785. @@ -0,0 +1,70 @@
  786. +/* file for future usage, by arris */
  787. +/*
  788. + * linux/fs/rfs/xattr_trusted.c
  789. + * Handler for trusted extended attributes.
  790. + *
  791. + */
  792. +
  793. +/* #include <linux/module.h>
  794. +#include <linux/string.h>
  795. +#include <linux/fs.h> */
  796. +#include <linux/capability.h>
  797. +#include <linux/xattr.h>
  798. +#include "rfs.h"
  799. +#include "xattr.h"
  800. +
  801. + static size_t
  802. +rfs_xattr_trusted_list(struct dentry *dentry, char *list, size_t list_size,
  803. + const char *name, size_t name_len, int type)
  804. +{
  805. + const size_t prefix_len = XATTR_TRUSTED_PREFIX_LEN;
  806. + const size_t total_len = prefix_len + name_len + 1;
  807. +
  808. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  809. +
  810. + if (!capable(CAP_SYS_ADMIN))
  811. + return 0;
  812. +
  813. + if (list && total_len <= list_size) {
  814. + memcpy(list, XATTR_TRUSTED_PREFIX, prefix_len);
  815. + memcpy(list+prefix_len, name, name_len);
  816. + list[prefix_len + name_len] = '\0';
  817. + }
  818. + return total_len;
  819. +}
  820. +
  821. + static int
  822. +rfs_xattr_trusted_get(struct dentry *dentry, const char *name, void *buffer,
  823. + size_t size, int type)
  824. +{
  825. + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
  826. +
  827. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  828. +
  829. + if (strcmp(name, "") == 0)
  830. + return -EINVAL;
  831. +
  832. + /* memcpy name etc to param? arris */
  833. + return rfs_xattr_get(dentry->d_inode, param, (unsigned int *)type);
  834. +}
  835. +
  836. + static int
  837. +rfs_xattr_trusted_set(struct dentry *dentry, const char *name,
  838. + const void *value, size_t size, int flags, int type)
  839. +{
  840. + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
  841. +
  842. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  843. +
  844. + if (strcmp(name, "") == 0)
  845. + return -EINVAL;
  846. + /* memcpy name etc to param? arris */
  847. + return rfs_xattr_set(dentry->d_inode, param);
  848. +}
  849. +
  850. +struct xattr_handler rfs_xattr_trusted_handler = {
  851. + .prefix = XATTR_TRUSTED_PREFIX,
  852. + .list = rfs_xattr_trusted_list,
  853. + .get = rfs_xattr_trusted_get,
  854. + .set = rfs_xattr_trusted_set,
  855. +};
  856.  
  857. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c
  858. ___________________________________________________________________
  859. Hinzugefügt: svn:eol-style
  860. + native
  861.  
  862. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c
  863. ===================================================================
  864. --- 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)
  865. +++ 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)
  866. @@ -0,0 +1,88 @@
  867. +/* file for future usage, by arris */
  868. +/*
  869. + * linux/fs/rfs/xattr_security.c
  870. + * Handler for storing security labels as extended attributes.
  871. + */
  872. +
  873. +// #include <linux/string.h>
  874. +// #include <linux/fs.h>
  875. +#include <linux/security.h>
  876. +#include <linux/xattr.h>
  877. +#include "rfs.h"
  878. +#include "xattr.h"
  879. +
  880. +static size_t rfs_xattr_security_list(struct dentry *dentry, char *list, size_t list_size,
  881. + const char *name, size_t name_len, int type)
  882. +{
  883. + const size_t prefix_len = sizeof(XATTR_SECURITY_PREFIX)-1;
  884. + const size_t total_len = prefix_len + name_len + 1;
  885. +
  886. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  887. +
  888. + if (list && total_len <= list_size) {
  889. + memcpy(list, XATTR_SECURITY_PREFIX, prefix_len);
  890. + memcpy(list+prefix_len, name, name_len);
  891. + list[prefix_len + name_len] = '\0';
  892. + }
  893. + return total_len;
  894. +}
  895. +
  896. +static int rfs_xattr_security_get(struct dentry *dentry, const char *name,
  897. + void *buffer, size_t size, int type)
  898. +{
  899. + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
  900. +
  901. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  902. +
  903. + if (strcmp(name, "") == 0)
  904. + return -EINVAL;
  905. +
  906. + /* memcpy name etc to param? arris */
  907. + return rfs_xattr_get(dentry->d_inode, param, (unsigned int *)type);
  908. + // RFS_XATTR_NS_SECURITY
  909. +}
  910. +
  911. +static int rfs_xattr_security_set(struct dentry *dentry, const char *name,
  912. + const void *value, size_t size, int flags, int type)
  913. +{
  914. + struct rfs_xattr_param *param = kzalloc(sizeof(struct rfs_xattr_param *), GFP_KERNEL);
  915. +
  916. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  917. +
  918. + if (strcmp(name, "") == 0)
  919. + return -EINVAL;
  920. +
  921. + /* memcpy name etc to param? arris */
  922. + return rfs_xattr_set(dentry->d_inode, param);
  923. +}
  924. +
  925. +int rfs_init_security(struct inode *inode, struct inode *dir)
  926. +{
  927. + int err;
  928. + size_t len;
  929. + void *value;
  930. + char *name;
  931. +
  932. + printk(KERN_INFO "[rfs_xattr] %s \n", __FUNCTION__);
  933. +
  934. + err = security_inode_init_security(inode, dir, &name, &value, &len);
  935. + if (err) {
  936. + if (err == -EOPNOTSUPP)
  937. + return 0;
  938. + return err;
  939. + }
  940. +
  941. + /* err = rfs_xattr_set_handle(handle, inode, RFS_XATTR_NS_SECURITY,
  942. + name, value, len, 0);
  943. + */
  944. + kfree(name);
  945. + kfree(value);
  946. + return err;
  947. +}
  948. +
  949. +struct xattr_handler rfs_xattr_security_handler = {
  950. + .prefix = XATTR_SECURITY_PREFIX,
  951. + .list = rfs_xattr_security_list,
  952. + .get = rfs_xattr_security_get,
  953. + .set = rfs_xattr_security_set,
  954. +};
  955.  
  956. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c
  957. ___________________________________________________________________
  958. Hinzugefügt: svn:eol-style
  959. + native
  960.  
  961. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/misc.c
  962. ===================================================================
  963. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/misc.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 0)
  964. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/misc.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Revision 1279)
  965. @@ -0,0 +1,11 @@
  966. +/* file for future usage, by arris */
  967. +
  968. +#include <linux/module.h>
  969. +
  970. +MODULE_LICENSE("GPL and additional rights");
  971. +MODULE_VERSION(CONFIG_RFS_VERSION"-SamyGO");
  972. +MODULE_DESCRIPTION("http://www.samygo.tv/");
  973. +MODULE_DESCRIPTION("http://www.samsung.com/global/business/semiconductor/products/fusionmemory/Products_RFS_ApplicationNotes.html");
  974. +MODULE_DESCRIPTION("SAMSUNG RFS (Robust File System)");
  975. +MODULE_DESCRIPTION("SamyGO Port by: Ser Lev Arris <arris@ZsoltTech.Com>");
  976. +MODULE_DESCRIPTION("SamyGO thanks to: marcelr");
  977.  
  978. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/misc.c
  979. ___________________________________________________________________
  980. Hinzugefügt: svn:eol-style
  981. + native
  982.  
  983. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/super.c
  984. ===================================================================
  985. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/super.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  986. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/super.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  987. @@ -41,11 +41,16 @@
  988.  
  989. #ifdef RFS_FOR_2_6
  990. enum {
  991. - opt_codepage, opt_err,
  992. + opt_codepage, opt_acl, opt_noacl, opt_vfat, opt_xattr, opt_noxattr, opt_err,
  993. };
  994.  
  995. static match_table_t rfs_tokens = {
  996. {opt_codepage, "codepage=%s"},
  997. + {opt_acl, "acl"},
  998. + {opt_noacl, "noacl"},
  999. + {opt_vfat, "vfat"},
  1000. + {opt_xattr, "xattr"},
  1001. + {opt_noxattr, "noxattr"},
  1002. {opt_err, NULL}
  1003. };
  1004. #endif
  1005. @@ -251,6 +256,13 @@
  1006. if (!options)
  1007. goto out;
  1008.  
  1009. + /*
  1010. + * in include/linux/rfs_fs.h
  1011. + * #define clear_opt(o, opt) (o &= ~RFS_MOUNT_##opt)
  1012. + * #define set_opt(o, opt) (o |= RFS_MOUNT_##opt)
  1013. + * #define test_opt(sb, opt) (RFS_SB(sb)->options.opts & \
  1014. + * RFS_MOUNT_##opt) */
  1015. +
  1016. #ifdef RFS_FOR_2_6
  1017. while ((p = strsep(&options, ",")) != NULL) {
  1018. int token;
  1019. @@ -267,6 +279,16 @@
  1020. return -ENOENT;
  1021. opts->codepage = codepage;
  1022. break;
  1023. + case opt_noxattr:
  1024. + clear_opt(opts->opts, XATTR_USER);
  1025. + case opt_xattr:
  1026. + set_opt(opts->opts, XATTR_USER);
  1027. + break;
  1028. + case opt_vfat:
  1029. + case opt_acl:
  1030. + case opt_noacl:
  1031. + DEBUG(DL0, "Mount option %s is not supported\n",p);
  1032. + break;
  1033. default:
  1034. return -EINVAL;
  1035. }
  1036. @@ -492,7 +514,9 @@
  1037. inode->i_gid = 0;
  1038.  
  1039. inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
  1040. +#ifndef RFS_FOR_2_6_19
  1041. inode->i_blksize = sb->s_blocksize;
  1042. +#endif
  1043. inode->i_version = 0;
  1044.  
  1045. insert_inode_hash(inode);
  1046. @@ -552,13 +576,12 @@
  1047. #ifdef RFS_FOR_2_6
  1048. struct rfs_sb_info *sbi;
  1049.  
  1050. - sbi = kmalloc(sizeof(struct rfs_sb_info), GFP_KERNEL);
  1051. + /* initialize sbi with 0x00 */
  1052. + /* log_info and pool_info must be initialized with 0 */
  1053. + sbi = kzalloc(sizeof(struct rfs_sb_info), GFP_KERNEL);
  1054. if (!sbi) /* memory error */
  1055. goto failed_mount;
  1056.  
  1057. - /* initialize sbi with 0x00 */
  1058. - /* log_info and pool_info must be initialized with 0 */
  1059. - memset(sbi, 0x00, sizeof(struct rfs_sb_info));
  1060. sb->s_fs_info = sbi;
  1061.  
  1062. old_blksize = block_size(sb->s_bdev);
  1063. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode.c
  1064. ===================================================================
  1065. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  1066. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/inode.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1067. @@ -191,6 +191,7 @@
  1068. }
  1069.  
  1070. #else
  1071. +#ifndef RFS_FOR_2_6_24
  1072. static int rfs_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to)
  1073. {
  1074. struct inode *inode = page->mapping->host;
  1075. @@ -209,8 +210,10 @@
  1076.  
  1077. return ret;
  1078. }
  1079. +#endif /* ! RFS_FOR_2_6_24 */
  1080. #endif
  1081.  
  1082. +#ifndef RFS_FOR_2_6_24
  1083. /**
  1084. * write a specified page
  1085. * @param file to write file
  1086. @@ -237,13 +240,54 @@
  1087.  
  1088. return ret;
  1089. }
  1090. +#endif /* ! RFS_FOR_2_6_24 */
  1091.  
  1092. +#ifdef RFS_FOR_2_6_24
  1093. +static int rfs_write_begin(struct file *file, struct address_space *mapping,
  1094. + loff_t pos, unsigned len, unsigned flags,
  1095. + struct page **pagep, void **fsdata){
  1096. + struct inode *inode = mapping->host;
  1097. + int ret = 0;
  1098. +
  1099. + if (rfs_log_start(inode->i_sb, RFS_LOG_WRITE, inode))
  1100. + return -EIO;
  1101. +
  1102. + *pagep = NULL;
  1103. + ret = cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
  1104. + rfs_get_block, &(RFS_I(inode)->mmu_private));
  1105. +
  1106. + return ret;
  1107. +}
  1108. +static int rfs_write_end(struct file *file, struct address_space *mapping,
  1109. + loff_t pos, unsigned len, unsigned copied,
  1110. + struct page *page, void *fsdata){
  1111. + struct inode *inode = mapping->host;
  1112. + int ret = 0;
  1113. +
  1114. + ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
  1115. +
  1116. + if (ret < len)
  1117. + RFS_BUG("Failed to write whole data(%u from %u pos: %lu)\n", ret, len, (unsigned long)pos);
  1118. +
  1119. + if (ret) {
  1120. + RFS_I(inode)->trunc_start = RFS_I(inode)->mmu_private;
  1121. + rfs_log_end(inode->i_sb, ret);
  1122. + }
  1123. + return ret;
  1124. +}
  1125. +#endif /* RFS_FOR_2_6_24 */
  1126. +
  1127. struct address_space_operations rfs_aops = {
  1128. .readpage = rfs_readpage,
  1129. .writepage = rfs_writepage,
  1130. .sync_page = block_sync_page,
  1131. - .prepare_write = rfs_prepare_write,
  1132. +#ifdef RFS_FOR_2_6_24
  1133. + .write_begin = rfs_write_begin,
  1134. + .write_end = rfs_write_end,
  1135. +#else
  1136. + .prepare_write = rfs_prepare_write,
  1137. .commit_write = rfs_commit_write,
  1138. +#endif
  1139. .direct_IO = rfs_direct_IO,
  1140. #ifdef RFS_FOR_2_6
  1141. .readpages = rfs_readpages,
  1142. @@ -437,7 +481,9 @@
  1143. inode->i_version = 0;
  1144. GET_ENTRY_TIME(ep, inode);
  1145.  
  1146. +#ifndef RFS_FOR_2_6_19
  1147. inode->i_blksize = sb->s_blocksize;
  1148. +#endif
  1149.  
  1150. inode->i_blocks = (inode->i_size + SECTOR_SIZE - 1) >> SECTOR_BITS;
  1151.  
  1152. @@ -500,7 +546,16 @@
  1153. dir->i_nlink++;
  1154. } else if (type == TYPE_FILE || type == TYPE_SYMLINK) {
  1155. /* initialize it when only create time */
  1156. +#if defined(CONFIG_PREEMPT) && defined(RFS_FOR_2_6_24) /* kernel_64m is tr patched and inode->i_mapping->nrpages is ok!
  1157. + * but for 2.6.24 (aquila) we need inode->i_mapping ? */
  1158. +
  1159. + truncate_inode_pages(inode->i_mapping, 0); /* it works on tv with rt patched 2.6.24
  1160. + * but...
  1161. + * unmap_mapping_range(inode->i_mapping, 0, 0, 0);
  1162. + * is more correct? */
  1163. +#else
  1164. inode->i_mapping->nrpages = 0;
  1165. +#endif
  1166. }
  1167.  
  1168. /* get new inode number */
  1169. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs.h
  1170. ===================================================================
  1171. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs.h (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  1172. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs.h (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1173. @@ -29,15 +29,25 @@
  1174.  
  1175. #include <linux/sched.h>
  1176. #include <linux/version.h>
  1177. -#include <asm/semaphore.h>
  1178. +#include <linux/buffer_head.h>
  1179.  
  1180. /*
  1181. * kernel version macro
  1182. */
  1183. #undef RFS_FOR_2_4
  1184. #undef RFS_FOR_2_6
  1185. +#undef RFS_FOR_2_6_10
  1186. +#undef RFS_FOR_2_6_16
  1187. #undef RFS_FOR_2_6_17
  1188. #undef RFS_FOR_2_6_18
  1189. +#undef RFS_FOR_2_6_19
  1190. +#undef RFS_FOR_2_6_20
  1191. +#undef RFS_FOR_2_6_22
  1192. +#undef RFS_FOR_2_6_23
  1193. +#undef RFS_FOR_2_6_24
  1194. +#undef RFS_FOR_2_6_27
  1195. +#undef RFS_FOR_2_6_29
  1196. +#undef RFS_FOR_2_6_34
  1197.  
  1198. #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
  1199. #define RFS_FOR_2_6 1
  1200. @@ -45,13 +55,46 @@
  1201. #define RFS_FOR_2_4 1
  1202. #endif
  1203.  
  1204. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
  1205. +#define RFS_FOR_2_6_34 1
  1206. +#endif
  1207. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
  1208. +#define RFS_FOR_2_6_29 1
  1209. +#endif
  1210. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
  1211. +#define RFS_FOR_2_6_27 1
  1212. +#endif
  1213. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
  1214. +#define RFS_FOR_2_6_24 1
  1215. +#endif
  1216. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
  1217. +#define RFS_FOR_2_6_23 1
  1218. +#endif
  1219. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
  1220. +#define RFS_FOR_2_6_22 1
  1221. +#endif
  1222. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
  1223. +#define RFS_FOR_2_6_20 1
  1224. +#endif
  1225. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
  1226. +#define RFS_FOR_2_6_19 1
  1227. +#endif
  1228. #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
  1229. -#define RFS_FOR_2_6_18 1
  1230. +#define RFS_FOR_2_6_18 1
  1231. #endif
  1232. #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
  1233. -#define RFS_FOR_2_6_17 1
  1234. +#define RFS_FOR_2_6_17 1
  1235. #endif
  1236. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
  1237. +#define RFS_FOR_2_6_16 1
  1238. +#endif
  1239. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10)
  1240. +#define RFS_FOR_2_6_10 1
  1241. +#endif
  1242.  
  1243. +#ifdef RFS_FOR_2_6_34
  1244. +#include <linux/slab.h>
  1245. +#endif
  1246.  
  1247. typedef enum rfs_lock_type {
  1248. RFS_FAT_LOCK,
  1249. @@ -137,6 +180,12 @@
  1250. } \
  1251. } while (0)
  1252.  
  1253. +#ifdef RFS_FOR_2_6_27
  1254. +#include <linux/semaphore.h>
  1255. +#else
  1256. +#include <asm/semaphore.h>
  1257. +#endif
  1258. +
  1259. struct rfs_semaphore {
  1260. struct semaphore mutex;
  1261. pid_t owner;
  1262. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Kconfig
  1263. ===================================================================
  1264. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Kconfig (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  1265. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Kconfig (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1266. @@ -2,11 +2,13 @@
  1267.  
  1268. config RFS_FS
  1269. tristate "Robust FAT Filesystem (RFS) support"
  1270. + default m
  1271. help
  1272. Samsung Robust File System support.
  1273.  
  1274. config RFS_VFAT
  1275. bool "FAT && long file name support"
  1276. + default y
  1277. depends on RFS_FS
  1278.  
  1279. config RFS_SYNC_ON_CLOSE
  1280. @@ -16,13 +18,61 @@
  1281. config RFS_NLS
  1282. bool "Support NLS on RFS filesystem"
  1283. select NLS
  1284. + default y
  1285. depends on RFS_VFAT
  1286.  
  1287. config RFS_DEFAULT_CODEPAGE
  1288. string "Use default NLS codepage"
  1289. - default "cp949"
  1290. + default NLS_DEFAULT
  1291. depends on RFS_NLS
  1292.  
  1293. +config RFS_POSIX_ATTR
  1294. + bool "POSIX attribute support"
  1295. + default false
  1296. + depends on RFS_FS
  1297. +
  1298. +config RFS_FS_XATTR
  1299. + bool "RFS extended attributes"
  1300. + depends on RFS_FS
  1301. + default false
  1302. + help
  1303. + Extended attributes are name:value pairs associated with inodes
  1304. + by the kernel or by users (see the attr(5) manual page,
  1305. + or visit <http://acl.bestbits.at/> for details).
  1306. +
  1307. +config RFS_FS_SECURITY
  1308. + bool "RFS Security Labels"
  1309. + depends on RFS_FS_XATTR
  1310. + help
  1311. + Security labels support alternative access control models
  1312. + implemented by security modules like SELinux.
  1313. + This option enables an extended attribute namespace
  1314. + for inode security labels in the RFS filesystem.
  1315. +
  1316. +#config RFS_FS_FULL_PERMISSION
  1317. +# bool "support 32bit uid, gid"
  1318. +# depends on RFS_FS_XATTR && RFS_POSIX_ATTR
  1319. +
  1320. +config RFS_FAST_LOOKUP
  1321. + bool "RFS fast file lookup"
  1322. + default false
  1323. + depends on RFS_FS
  1324. +
  1325. +config RFS_FAST_SEEK
  1326. + bool "RFS fast seek"
  1327. + default false
  1328. + depends on RFS_FS
  1329. +
  1330. +#config RFS_QUOTA
  1331. +# bool
  1332. +# depends on QUOTA && RFS_POSIX_ATTR
  1333. +# default y
  1334. +
  1335. +config RFS_UID_BITS
  1336. + int
  1337. + default 8
  1338. + depends on RFS_POSIX_ATTR
  1339. +
  1340. config RFS_FAT_DEBUG
  1341. bool "FAT Debug Message support"
  1342. depends on RFS_FS
  1343. @@ -33,7 +83,8 @@
  1344. depends on RFS_FAT_DEBUG
  1345.  
  1346. config RFS_MAPDESTROY
  1347. - bool
  1348. + bool
  1349. + default false
  1350.  
  1351. config RFS_PRE_ALLOC
  1352. int
  1353. @@ -41,6 +92,6 @@
  1354.  
  1355. config RFS_VERSION
  1356. string
  1357. - default "1.2.2p1-rc2"
  1358. + default "RFS_1.3.1_b070"
  1359.  
  1360. endmenu
  1361. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs_26.c
  1362. ===================================================================
  1363. --- 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)
  1364. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/rfs_26.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1365. @@ -262,7 +262,11 @@
  1366. }
  1367.  
  1368. /* local variable definition */
  1369. +#ifdef RFS_FOR_2_6_20
  1370. +static struct kmem_cache *rfs_inode_cachep = NULL;
  1371. +#else
  1372. static kmem_cache_t *rfs_inode_cachep = NULL;
  1373. +#endif
  1374.  
  1375. /* static function definition */
  1376. /**
  1377. @@ -271,12 +275,22 @@
  1378. * @param cachep a pointer for inode cache
  1379. * @param flags control flag
  1380. */
  1381. +#ifdef RFS_FOR_2_6_27
  1382. +static void init_once(void *foo)
  1383. +#elif defined RFS_FOR_2_6_24
  1384. +static void init_once(struct kmem_cache *cachep, void *foo)
  1385. +#elif defined RFS_FOR_2_6_20
  1386. +static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
  1387. +#else
  1388. static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
  1389. +#endif
  1390. {
  1391. struct rfs_inode_info *ei = (struct rfs_inode_info *) foo;
  1392.  
  1393. +#ifndef RFS_FOR_2_6_22
  1394. if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
  1395. SLAB_CTOR_CONSTRUCTOR)
  1396. +#endif
  1397. inode_init_once(&ei->vfs_inode);
  1398. }
  1399.  
  1400. @@ -286,9 +300,15 @@
  1401. static int __init rfs_init_inodecache(void)
  1402. {
  1403. rfs_inode_cachep = kmem_cache_create("rfs_inode_cache",
  1404. - sizeof(struct rfs_inode_info),
  1405. - 0, SLAB_RECLAIM_ACCOUNT,
  1406. - init_once, NULL);
  1407. + sizeof(struct rfs_inode_info),
  1408. +#ifdef RFS_FOR_2_6_23
  1409. + 0, (SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD),
  1410. + init_once);
  1411. +#else
  1412. + 0, SLAB_RECLAIM_ACCOUNT,
  1413. + init_once, NULL);
  1414. +#endif
  1415. +
  1416. if (!rfs_inode_cachep)
  1417. return -ENOMEM;
  1418.  
  1419. @@ -316,7 +336,11 @@
  1420. {
  1421. struct rfs_inode_info *new;
  1422.  
  1423. +#ifdef RFS_FOR_2_6_20
  1424. + new = kmem_cache_alloc(rfs_inode_cachep, GFP_KERNEL);
  1425. +#else
  1426. new = kmem_cache_alloc(rfs_inode_cachep, SLAB_KERNEL);
  1427. +#endif
  1428. if (!new)
  1429. return NULL;
  1430.  
  1431. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/file.c
  1432. ===================================================================
  1433. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/file.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  1434. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/file.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1435. @@ -33,6 +33,8 @@
  1436. #include "rfs.h"
  1437. #include "log.h"
  1438.  
  1439. +#include "xattr.h"
  1440. +
  1441. #ifdef CONFIG_GCOV_PROFILE
  1442. #define loff_t off_t
  1443. #endif
  1444. @@ -498,7 +500,11 @@
  1445. * System file (log or pool file) can not be accessed
  1446. */
  1447. #ifdef RFS_FOR_2_6
  1448. +#ifdef RFS_FOR_2_6_27
  1449. +int rfs_permission(struct inode *inode, int mode)
  1450. +#else
  1451. int rfs_permission(struct inode *inode, int mode, struct nameidata *nd)
  1452. +#endif
  1453. #else
  1454. int rfs_permission(struct inode *inode, int mode)
  1455. #endif
  1456. @@ -530,7 +536,11 @@
  1457. ssize_t ret;
  1458. int err;
  1459.  
  1460. +#ifdef RFS_FOR_2_6_19
  1461. + ret = do_sync_write(file, buf, count, ppos);
  1462. +#else
  1463. ret = generic_file_write(file, buf, count, ppos);
  1464. +#endif
  1465. if (ret <= 0)
  1466. return ret;
  1467.  
  1468. @@ -590,7 +600,13 @@
  1469. #endif
  1470.  
  1471. struct file_operations rfs_file_operations = {
  1472. +#ifdef RFS_FOR_2_6_19
  1473. + .read = do_sync_read,
  1474. + .aio_read = generic_file_aio_read,
  1475. + .aio_write = generic_file_aio_write,
  1476. +#else
  1477. .read = generic_file_read,
  1478. +#endif
  1479. .write = rfs_file_write,
  1480. .mmap = generic_file_mmap,
  1481. .fsync = rfs_file_fsync,
  1482. @@ -603,6 +619,13 @@
  1483. .truncate = rfs_truncate,
  1484. .permission = rfs_permission,
  1485. .setattr = rfs_setattr,
  1486. +#ifdef CONFIG_RFS_FS_XATTR
  1487. + .setxattr = rfs_xattr_set,
  1488. + .getxattr = rfs_xattr_get,
  1489. + .listxattr = rfs_xattr_list,
  1490. + .removexattr = rfs_xattr_delete,
  1491. +#endif
  1492. +// .check_acl = generic_check_acl,
  1493. };
  1494.  
  1495. /**
  1496. @@ -660,7 +683,7 @@
  1497. if (ret) {
  1498. RFS_I(inode)->mmu_private -= sb->s_blocksize;
  1499. RFS_BUG("iblock(%ld) doesn't have a physical mapping",
  1500. - iblock);
  1501. + (long int)iblock);
  1502. goto out;
  1503. }
  1504.  
  1505. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/cluster.c
  1506. ===================================================================
  1507. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/cluster.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  1508. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/cluster.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1509. @@ -442,7 +442,7 @@
  1510.  
  1511. if (next < VALID_CLU) { /* out-of-range input */
  1512. fat_unlock(sb);
  1513. - RFS_BUG("fat entry(%u) was corrupted\n", next);
  1514. + RFS_BUG("fat entry(%u) was corrupted\nTry to repair your partition with: fsck.vfat -a\n", next);
  1515. return -EIO;
  1516. }
  1517.  
  1518. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Makefile.26
  1519. ===================================================================
  1520. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Makefile.26 (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  1521. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Makefile.26 (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1522. @@ -2,9 +2,22 @@
  1523. # Makefile for the linux rfs-filesystem (kernel 2.6)
  1524. #
  1525.  
  1526. -obj-$(CONFIG_RFS_FS) += rfs.o
  1527. +obj-$(CONFIG_RFS_FS) += rfs.o
  1528.  
  1529. -rfs-y += cluster.o code_convert.o dos.o
  1530. -rfs-y += dir.o file.o inode.o namei.o super.o
  1531. -rfs-y += log.o log_replay.o
  1532. -rfs-y += rfs_26.o
  1533. +rfs-y += fcache.o cluster.o code_convert.o dos.o
  1534. +rfs-y += dir.o file.o inode_26.o inode.o namei.o super.o
  1535. +rfs-y += log.o log_replay.o
  1536. +rfs-y += rfs_26.o
  1537. +#ifdef CONFIG_PROC_FS
  1538. +rfs-y += misc.o
  1539. +#endif
  1540. +ifdef CONFIG_RFS_FS_XATTR
  1541. + rfs-y += xattr.o xattr_user.o xattr_trusted.o
  1542. +endif
  1543. +#ifdef CONFIG_RFS_FS_POSIX_ACL
  1544. +rfs-y +=
  1545. +#endif
  1546. +ifdef CONFIG_RFS_FS_SECURITY
  1547. + rfs-y += xattr_security.o
  1548. +endif
  1549. +
  1550. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/dos.c
  1551. ===================================================================
  1552. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/dos.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  1553. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/dos.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1554. @@ -153,7 +153,7 @@
  1555. * @param i offset of target bit
  1556. * @return none
  1557. */
  1558. -static inline void bitmap_set(unsigned char *bitmap, int i)
  1559. +static inline void rfs_bitmap_set(unsigned char *bitmap, int i)
  1560. {
  1561. bitmap[i >> 3] |= (0x01 << (i & 0x7));
  1562. }
  1563. @@ -282,7 +282,7 @@
  1564. int err = 0;
  1565.  
  1566. bitmap_clear_all(bmap, (MAX_NUMERIC >> 3));
  1567. - bitmap_set(bmap, 0);
  1568. + rfs_bitmap_set(bmap, 0);
  1569.  
  1570. while (1) {
  1571. ep = get_entry(dir, cpos++, &bh);
  1572. @@ -318,7 +318,7 @@
  1573. }
  1574.  
  1575. if (count)
  1576. - bitmap_set(bmap, count);
  1577. + rfs_bitmap_set(bmap, count);
  1578. }
  1579.  
  1580. for (count = 0, i = 0; (!count) && (i < (MAX_NUMERIC >> 3)); i++) {
  1581. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/namei.c
  1582. ===================================================================
  1583. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/namei.c (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  1584. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/namei.c (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1585. @@ -27,10 +27,12 @@
  1586. #include <linux/fs.h>
  1587. #include <linux/rfs_fs.h>
  1588. #include <linux/sched.h>
  1589. -
  1590. +
  1591. #include "rfs.h"
  1592. #include "log.h"
  1593.  
  1594. +#include "xattr.h"
  1595. +
  1596. #define SLASH '/'
  1597.  
  1598. #define ROOT_MTIME(sb) (sb->s_root->d_inode->i_mtime)
  1599. @@ -1089,5 +1091,12 @@
  1600. .rename = rfs_rename,
  1601. .permission = rfs_permission,
  1602. .setattr = rfs_setattr,
  1603. +#ifdef CONFIG_RFS_FS_XATTR
  1604. + .setxattr = rfs_xattr_set,
  1605. + .getxattr = rfs_xattr_get,
  1606. + .listxattr = rfs_xattr_list,
  1607. + .removexattr = rfs_xattr_delete,
  1608. +#endif
  1609. +// .check_acl = generic_check_acl,
  1610. };
  1611.  
  1612. Index: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Config.in
  1613. ===================================================================
  1614. --- RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Config.in (.../RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port) (Revision 1229)
  1615. +++ RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs/Config.in (.../RFS_1.3.1_b070_kernel_m64_SamyGO_port) (Arbeitskopie)
  1616. @@ -26,7 +26,7 @@
  1617. fi
  1618.  
  1619. define_bool CONFIG_RFS_IGET4 y
  1620. -define_string CONFIG_RFS_VERSION "1.2.2p1-rc2"
  1621. +define_string CONFIG_RFS_VERSION "RFS_1.3.1_b070"
  1622.  
  1623. # When file is extended, it is the max number of clusters
  1624. # which one transaction can use.
  1625.  
  1626. Eigenschaftsänderungen: RFS_1.3.1_b070_kernel_m64_SamyGO_port/fs/rfs
  1627. ___________________________________________________________________
  1628. Hinzugefügt: svn:mergeinfo
  1629. Zusammengeführt /RFS/RFS_1.2.2p1-rc2_kernel_m64/fs/rfs:r1230-1267
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement