daily pastebin goal
14%
SHARE
TWEET

SamyGO rfs patch, tested from kernel 2.6.17.14 to 2.6.33.5 also with some rt-patched

a guest Feb 9th, 2011 814 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt
  2. ===================================================================
  3. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt     (Revision 0)
  4. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt     (Revision 1264)
  5. @@ -0,0 +1,104 @@
  6. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/include/linux/rfs_fs.h
  7. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/include/linux/rfs_fs_sb.h
  8. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/super.c
  9. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/inode.c
  10. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/rfs.h
  11. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/Kconfig
  12. +AM      RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c
  13. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/rfs_26.c
  14. +AM      RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr.c
  15. +AM      RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/inode_26.c
  16. +AM      RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/fcache.c
  17. +AM      RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c
  18. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/file.c
  19. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/cluster.c
  20. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/Makefile.26
  21. +M       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/dos.c
  22. +AM      RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c
  23. +AM      RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/misc.c
  24. +AM      RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt
  25. +A       RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/Documentation
  26. +------------------------------------------------------------------------
  27. +r1263 | arris | 2011-02-08 22:07:08 +0100 (Di, 08. Feb 2011) | 1 Zeile
  28. +
  29. +nick fixed
  30. +------------------------------------------------------------------------
  31. +r1262 | arris | 2011-02-08 19:47:45 +0100 (Di, 08. Feb 2011) | 1 Zeile
  32. +
  33. +comment about xrs_stl_delete()
  34. +------------------------------------------------------------------------
  35. +r1258 | arris | 2011-02-07 20:15:13 +0100 (Mo, 07. Feb 2011) | 4 Zeilen
  36. +
  37. +adapt fixes for UExxB7020
  38. +need also patch in drivers/fsr/Kconfig:
  39. +config RFS_STL_DELETE drop MAPDESROY selection!!!
  40. +
  41. +------------------------------------------------------------------------
  42. +r1257 | arris | 2011-02-07 18:02:46 +0100 (Mo, 07. Feb 2011) | 1 Zeile
  43. +
  44. +synced fix for 2.6.34, kmalloc gone to slab.h
  45. +------------------------------------------------------------------------
  46. +r1246 | arris | 2011-02-06 18:38:45 +0100 (So, 06. Feb 2011) | 1 Zeile
  47. +
  48. +2.6.33 port from RFS_1.2.3p1 bitmap_set function name conflict with new kernel function
  49. +------------------------------------------------------------------------
  50. +r1242 | arris | 2011-02-06 15:19:29 +0100 (So, 06. Feb 2011) | 1 Zeile
  51. +
  52. +2.6.27 2.6.28 2.6.29 2.6.30 2.6.31 2.6.32 ok
  53. +------------------------------------------------------------------------
  54. +r1241 | arris | 2011-02-06 12:01:41 +0100 (So, 06. Feb 2011) | 1 Zeile
  55. +
  56. +nothing function dependend
  57. +------------------------------------------------------------------------
  58. +r1240 | arris | 2011-02-06 10:39:35 +0100 (So, 06. Feb 2011) | 1 Zeile
  59. +
  60. +2.6.27 rfs_permission arguments changed, added (incomplete) Documentation/README-RFS-SamyGO-port.txt
  61. +------------------------------------------------------------------------
  62. +r1239 | arris | 2011-02-06 09:21:55 +0100 (So, 06. Feb 2011) | 1 Zeile
  63. +
  64. +2.6.24-rt1 CONFIG_PREEMPT(_RT) fix
  65. +------------------------------------------------------------------------
  66. +r1238 | arris | 2011-02-06 08:38:24 +0100 (So, 06. Feb 2011) | 1 Zeile
  67. +
  68. +2.6.24 rfs_prepare_write rfs_commit_write replaced by rfs_write_begin rfs_write_end, added missing cast
  69. +------------------------------------------------------------------------
  70. +r1237 | arris | 2011-02-06 08:27:40 +0100 (So, 06. Feb 2011) | 1 Zeile
  71. +
  72. +2.6.24 rfs_prepare_write rfs_commit_write replaced by rfs_write_begin rfs_write_end
  73. +------------------------------------------------------------------------
  74. +r1236 | arris | 2011-02-05 16:17:17 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  75. +
  76. +2.6.23 kmem_cache_create argument count changed, added SLAB_MEM_SPREAD flags too
  77. +------------------------------------------------------------------------
  78. +r1235 | arris | 2011-02-05 15:43:10 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  79. +
  80. +2.6.22 SLAB_CTOR_* gone
  81. +------------------------------------------------------------------------
  82. +r1234 | arris | 2011-02-05 14:24:54 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  83. +
  84. +2.6.20 SLAB_KERNEL gone, kmem_cache_t to struct kmem_cache, added more info to RFS_BUG in cluster.c, missed newline
  85. +------------------------------------------------------------------------
  86. +r1233 | arris | 2011-02-05 14:21:34 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  87. +
  88. +2.6.20 SLAB_KERNEL gone, kmem_cache_t to struct kmem_cache, added more info to RFS_BUG in cluster.c
  89. +------------------------------------------------------------------------
  90. +r1232 | arris | 2011-02-05 13:37:57 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  91. +
  92. +define fix for later comming kernel
  93. +------------------------------------------------------------------------
  94. +r1231 | arris | 2011-02-05 12:21:19 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  95. +
  96. +2.6.19 generic_file_read generic_file_write gone
  97. +------------------------------------------------------------------------
  98. +r1230 | arris | 2011-02-05 10:02:30 +0100 (Sa, 05. Feb 2011) | 1 Zeile
  99. +
  100. +initial fixes for SamyGO port
  101. +------------------------------------------------------------------------
  102. +r1229 | arris | 2011-02-04 18:45:04 +0100 (Fr, 04. Feb 2011) | 1 Zeile
  103. +
  104. +added tree for patch generation from svn
  105. +------------------------------------------------------------------------
  106. +r1222 | arris | 2011-02-02 16:10:17 +0100 (Mi, 02. Feb 2011) | 1 Zeile
  107. +
  108. +added initial RFS sources from kernel_64m
  109. +------------------------------------------------------------------------
  110.  
  111. Eigenschaftsänderungen: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/Documentation/README-RFS-SamyGO-port.txt
  112. ___________________________________________________________________
  113. Hinzugefügt: svn:eol-style
  114.    + native
  115.  
  116. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/include/linux/rfs_fs.h
  117. ===================================================================
  118. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/include/linux/rfs_fs.h       (Revision 1229)
  119. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/include/linux/rfs_fs.h       (Arbeitskopie)
  120. @@ -397,7 +397,11 @@
  121.  int rfs_bmap (struct inode *, long, unsigned long *);
  122.  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
  123.  int rfs_get_block (struct inode *, sector_t, struct buffer_head *, int);
  124. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
  125. +int rfs_permission (struct inode *, int);
  126. +#else
  127.  int rfs_permission (struct inode *, int, struct nameidata *);
  128. +#endif
  129.  #else
  130.  int rfs_get_block (struct inode *, long, struct buffer_head *, int);
  131.  int rfs_permission (struct inode *, int);
  132. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/include/linux/rfs_fs_sb.h
  133. ===================================================================
  134. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/include/linux/rfs_fs_sb.h    (Revision 1229)
  135. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/include/linux/rfs_fs_sb.h    (Arbeitskopie)
  136. @@ -26,7 +26,12 @@
  137.  #ifndef _LINUX_RFS_FS_SB
  138.  #define _LINUX_RFS_FS_SB
  139.  
  140. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
  141. +#include <linux/semaphore.h>
  142. +#else
  143.  #include <asm/semaphore.h>
  144. +#endif
  145. +
  146.  /*
  147.   * RFS file system superblock data in memory(in-core)
  148.   */
  149. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c
  150. ===================================================================
  151. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c  (Revision 0)
  152. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c  (Revision 1264)
  153. @@ -0,0 +1 @@
  154. +/* file for future usage, by arris */
  155.  
  156. Eigenschaftsänderungen: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_user.c
  157. ___________________________________________________________________
  158. Hinzugefügt: svn:eol-style
  159.    + native
  160.  
  161. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr.c
  162. ===================================================================
  163. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr.c       (Revision 0)
  164. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr.c       (Revision 1264)
  165. @@ -0,0 +1 @@
  166. +/* file for future usage, by arris */
  167.  
  168. Eigenschaftsänderungen: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr.c
  169. ___________________________________________________________________
  170. Hinzugefügt: svn:eol-style
  171.    + native
  172.  
  173. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/inode_26.c
  174. ===================================================================
  175. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/inode_26.c    (Revision 0)
  176. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/inode_26.c    (Revision 1264)
  177. @@ -0,0 +1,2 @@
  178. +/* file for future usage, by arris */
  179. +
  180.  
  181. Eigenschaftsänderungen: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/inode_26.c
  182. ___________________________________________________________________
  183. Hinzugefügt: svn:eol-style
  184.    + native
  185.  
  186. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/fcache.c
  187. ===================================================================
  188. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/fcache.c      (Revision 0)
  189. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/fcache.c      (Revision 1264)
  190. @@ -0,0 +1 @@
  191. +/* file for future usage, by arris */
  192.  
  193. Eigenschaftsänderungen: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/fcache.c
  194. ___________________________________________________________________
  195. Hinzugefügt: svn:eol-style
  196.    + native
  197.  
  198. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c
  199. ===================================================================
  200. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c       (Revision 0)
  201. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c       (Revision 1264)
  202. @@ -0,0 +1 @@
  203. +/* file for future usage, by arris */
  204.  
  205. Eigenschaftsänderungen: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_trusted.c
  206. ___________________________________________________________________
  207. Hinzugefügt: svn:eol-style
  208.    + native
  209.  
  210. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c
  211. ===================================================================
  212. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c      (Revision 0)
  213. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c      (Revision 1264)
  214. @@ -0,0 +1 @@
  215. +/* file for future usage, by arris */
  216.  
  217. Eigenschaftsänderungen: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/xattr_security.c
  218. ___________________________________________________________________
  219. Hinzugefügt: svn:eol-style
  220.    + native
  221.  
  222. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/misc.c
  223. ===================================================================
  224. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/misc.c        (Revision 0)
  225. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/misc.c        (Revision 1264)
  226. @@ -0,0 +1,11 @@
  227. +/* file for future usage, by arris */
  228. +
  229. +#include <linux/module.h>
  230. +
  231. +MODULE_LICENSE("GPL and additional rights");
  232. +MODULE_VERSION(CONFIG_RFS_VERSION"-SamyGO");
  233. +MODULE_DESCRIPTION("http://www.samygo.tv/");
  234. +MODULE_DESCRIPTION("http://www.samsung.com/global/business/semiconductor/products/fusionmemory/Products_RFS_ApplicationNotes.html");
  235. +MODULE_DESCRIPTION("SAMSUNG RFS (Robust File System)");
  236. +MODULE_DESCRIPTION("SamyGO Port by: Ser Lev Arris <arris@ZsoltTech.Com>");
  237. +MODULE_DESCRIPTION("SamyGO thanks to: marcelr");
  238.  
  239. Eigenschaftsänderungen: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/misc.c
  240. ___________________________________________________________________
  241. Hinzugefügt: svn:eol-style
  242.    + native
  243.  
  244. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/super.c
  245. ===================================================================
  246. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/super.c       (Revision 1229)
  247. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/super.c       (Arbeitskopie)
  248. @@ -492,7 +492,9 @@
  249.         inode->i_gid = 0;
  250.  
  251.         inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
  252. +#ifndef RFS_FOR_2_6_19
  253.         inode->i_blksize = sb->s_blocksize;
  254. +#endif
  255.         inode->i_version = 0;
  256.  
  257.         insert_inode_hash(inode);
  258. @@ -552,13 +554,12 @@
  259.  #ifdef RFS_FOR_2_6
  260.         struct rfs_sb_info *sbi;
  261.  
  262. -       sbi = kmalloc(sizeof(struct rfs_sb_info), GFP_KERNEL);
  263. +       /* initialize sbi with 0x00 */
  264. +       /* log_info and pool_info must be initialized with 0 */
  265. +       sbi = kzalloc(sizeof(struct rfs_sb_info), GFP_KERNEL);
  266.         if (!sbi) /* memory error */
  267.                 goto failed_mount;
  268.  
  269. -       /* initialize sbi with 0x00 */
  270. -       /* log_info and pool_info must be initialized with 0 */
  271. -       memset(sbi, 0x00, sizeof(struct rfs_sb_info));
  272.         sb->s_fs_info = sbi;
  273.  
  274.         old_blksize = block_size(sb->s_bdev);
  275. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/inode.c
  276. ===================================================================
  277. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/inode.c       (Revision 1229)
  278. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/inode.c       (Arbeitskopie)
  279. @@ -191,6 +191,7 @@
  280.  }
  281.  
  282.  #else
  283. +#ifndef RFS_FOR_2_6_24
  284.  static int rfs_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to)
  285.  {
  286.         struct inode *inode = page->mapping->host;
  287. @@ -209,8 +210,10 @@
  288.  
  289.         return ret;
  290.  }
  291. +#endif /* ! RFS_FOR_2_6_24 */
  292.  #endif
  293.  
  294. +#ifndef RFS_FOR_2_6_24
  295.  /**
  296.   *  write a specified page
  297.   * @param file         to write file
  298. @@ -237,13 +240,54 @@
  299.  
  300.         return ret;
  301.  }
  302. +#endif /* ! RFS_FOR_2_6_24 */
  303.  
  304. +#ifdef RFS_FOR_2_6_24
  305. +static int rfs_write_begin(struct file *file, struct address_space *mapping,
  306. +               loff_t pos, unsigned len, unsigned flags,
  307. +               struct page **pagep, void **fsdata){
  308. +       struct inode *inode = mapping->host;
  309. +       int ret = 0;
  310. +
  311. +       if (rfs_log_start(inode->i_sb, RFS_LOG_WRITE, inode))
  312. +               return -EIO;
  313. +
  314. +       *pagep = NULL;
  315. +       ret = cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
  316. +                       rfs_get_block, &(RFS_I(inode)->mmu_private));
  317. +
  318. +       return ret;
  319. +}
  320. +static int rfs_write_end(struct file *file, struct address_space *mapping,
  321. +               loff_t pos, unsigned len, unsigned copied,
  322. +               struct page *page, void *fsdata){
  323. +       struct inode *inode = mapping->host;
  324. +       int ret = 0;
  325. +
  326. +       ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
  327. +
  328. +       if (ret < len)
  329. +               RFS_BUG("Failed to write whole data(%u from %u pos: %lu)\n", ret, len, (unsigned long)pos);
  330. +
  331. +       if (ret) {
  332. +               RFS_I(inode)->trunc_start = RFS_I(inode)->mmu_private;
  333. +               rfs_log_end(inode->i_sb, ret);
  334. +       }
  335. +       return ret;
  336. +}
  337. +#endif /* RFS_FOR_2_6_24 */
  338. +
  339.  struct address_space_operations rfs_aops = {
  340.          .readpage      = rfs_readpage,
  341.          .writepage     = rfs_writepage,
  342.         .sync_page      = block_sync_page,
  343. -        .prepare_write = rfs_prepare_write,
  344. +#ifdef RFS_FOR_2_6_24
  345. +       .write_begin    = rfs_write_begin,
  346. +       .write_end      = rfs_write_end,
  347. +#else
  348. +       .prepare_write  = rfs_prepare_write,
  349.          .commit_write  = rfs_commit_write,
  350. +#endif
  351.         .direct_IO      = rfs_direct_IO,
  352.  #ifdef RFS_FOR_2_6
  353.         .readpages      = rfs_readpages,
  354. @@ -437,7 +481,9 @@
  355.         inode->i_version = 0;
  356.         GET_ENTRY_TIME(ep, inode);
  357.  
  358. +#ifndef RFS_FOR_2_6_19
  359.         inode->i_blksize = sb->s_blocksize;
  360. +#endif
  361.  
  362.         inode->i_blocks = (inode->i_size + SECTOR_SIZE - 1) >> SECTOR_BITS;
  363.  
  364. @@ -500,7 +546,16 @@
  365.                 dir->i_nlink++;
  366.         } else if (type == TYPE_FILE || type == TYPE_SYMLINK) {
  367.                 /* initialize it when only create time */
  368. +#if defined(CONFIG_PREEMPT) && defined(RFS_FOR_2_6_24) /* kernel_64m is tr patched and inode->i_mapping->nrpages is ok!
  369. +                                                       * but for 2.6.24 (aquila) we need inode->i_mapping ? */
  370. +
  371. +               truncate_inode_pages(inode->i_mapping, 0); /* it works on tv with rt patched 2.6.24
  372. +                                                            * but...
  373. +                                                            * unmap_mapping_range(inode->i_mapping, 0, 0, 0);
  374. +                                                            * is more correct? */
  375. +#else
  376.                 inode->i_mapping->nrpages = 0;
  377. +#endif
  378.         }
  379.  
  380.         /* get new inode number */
  381. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/rfs.h
  382. ===================================================================
  383. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/rfs.h (Revision 1229)
  384. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/rfs.h (Arbeitskopie)
  385. @@ -29,15 +29,24 @@
  386.  
  387.  #include <linux/sched.h>
  388.  #include <linux/version.h>
  389. -#include <asm/semaphore.h>
  390.  
  391.  /*
  392.   *  kernel version macro
  393.   */
  394.  #undef RFS_FOR_2_4
  395.  #undef RFS_FOR_2_6
  396. +#undef RFS_FOR_2_6_10
  397. +#undef RFS_FOR_2_6_16
  398.  #undef RFS_FOR_2_6_17
  399.  #undef RFS_FOR_2_6_18
  400. +#undef RFS_FOR_2_6_19
  401. +#undef RFS_FOR_2_6_20
  402. +#undef RFS_FOR_2_6_22
  403. +#undef RFS_FOR_2_6_23
  404. +#undef RFS_FOR_2_6_24
  405. +#undef RFS_FOR_2_6_27
  406. +#undef RFS_FOR_2_6_29
  407. +#undef RFS_FOR_2_6_34
  408.  
  409.  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
  410.  #define RFS_FOR_2_6            1
  411. @@ -45,13 +54,46 @@
  412.  #define RFS_FOR_2_4            1
  413.  #endif
  414.  
  415. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
  416. +#define RFS_FOR_2_6_34          1
  417. +#endif
  418. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
  419. +#define RFS_FOR_2_6_29          1
  420. +#endif
  421. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
  422. +#define RFS_FOR_2_6_27          1
  423. +#endif
  424. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
  425. +#define RFS_FOR_2_6_24          1
  426. +#endif
  427. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
  428. +#define RFS_FOR_2_6_23          1
  429. +#endif
  430. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
  431. +#define RFS_FOR_2_6_22          1
  432. +#endif
  433. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
  434. +#define RFS_FOR_2_6_20          1
  435. +#endif
  436. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
  437. +#define RFS_FOR_2_6_19          1
  438. +#endif
  439.  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
  440. -#define RFS_FOR_2_6_18         1
  441. +#define RFS_FOR_2_6_18          1
  442.  #endif
  443.  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17)
  444. -#define RFS_FOR_2_6_17         1
  445. +#define RFS_FOR_2_6_17          1
  446.  #endif
  447. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
  448. +#define RFS_FOR_2_6_16          1
  449. +#endif
  450. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10)
  451. +#define RFS_FOR_2_6_10          1
  452. +#endif
  453.  
  454. +#ifdef RFS_FOR_2_6_34
  455. +#include <linux/slab.h>
  456. +#endif
  457.  
  458.  typedef enum rfs_lock_type {
  459.         RFS_FAT_LOCK,
  460. @@ -137,6 +179,12 @@
  461.         }                                                               \
  462.  } while (0)
  463.  
  464. +#ifdef RFS_FOR_2_6_27
  465. +#include <linux/semaphore.h>
  466. +#else
  467. +#include <asm/semaphore.h>
  468. +#endif
  469. +
  470.  struct rfs_semaphore {
  471.         struct semaphore mutex;
  472.         pid_t owner;
  473. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/Kconfig
  474. ===================================================================
  475. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/Kconfig       (Revision 1229)
  476. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/Kconfig       (Arbeitskopie)
  477. @@ -2,11 +2,13 @@
  478.  
  479.  config RFS_FS
  480.         tristate "Robust FAT Filesystem (RFS) support"
  481. +       default m
  482.         help
  483.           Samsung Robust File System support.
  484.  
  485.  config RFS_VFAT
  486.         bool "FAT && long file name support"
  487. +       default y
  488.         depends on RFS_FS
  489.  
  490.  config RFS_SYNC_ON_CLOSE
  491. @@ -16,11 +18,12 @@
  492.  config RFS_NLS
  493.         bool "Support NLS on RFS filesystem"
  494.         select NLS
  495. +       default y
  496.         depends on RFS_VFAT
  497.  
  498.  config RFS_DEFAULT_CODEPAGE
  499.         string "Use default NLS codepage"
  500. -       default "cp949"
  501. +       default NLS_DEFAULT
  502.         depends on RFS_NLS
  503.  
  504.  config RFS_FAT_DEBUG
  505. @@ -33,7 +36,8 @@
  506.         depends on RFS_FAT_DEBUG
  507.  
  508.  config RFS_MAPDESTROY
  509. -       bool
  510. +       bool
  511. +       default false
  512.  
  513.  config RFS_PRE_ALLOC
  514.         int
  515. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/rfs_26.c
  516. ===================================================================
  517. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/rfs_26.c      (Revision 1229)
  518. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/rfs_26.c      (Arbeitskopie)
  519. @@ -262,7 +262,11 @@
  520.  }
  521.  
  522.  /* local variable definition */
  523. +#ifdef RFS_FOR_2_6_20
  524. +static struct kmem_cache *rfs_inode_cachep = NULL;
  525. +#else
  526.  static kmem_cache_t *rfs_inode_cachep = NULL;
  527. +#endif
  528.  
  529.  /* static function definition */
  530.  /**
  531. @@ -271,12 +275,22 @@
  532.   * @param cachep       a pointer for inode cache
  533.   * @param flags                control flag
  534.   */
  535. +#ifdef RFS_FOR_2_6_27
  536. +static void init_once(void *foo)
  537. +#elif defined RFS_FOR_2_6_24
  538. +static void init_once(struct kmem_cache *cachep, void *foo)
  539. +#elif defined RFS_FOR_2_6_20
  540. +static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
  541. +#else
  542.  static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
  543. +#endif
  544.  {
  545.         struct rfs_inode_info *ei = (struct rfs_inode_info *) foo;
  546.  
  547. +#ifndef RFS_FOR_2_6_22
  548.         if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
  549.                         SLAB_CTOR_CONSTRUCTOR)
  550. +#endif
  551.                 inode_init_once(&ei->vfs_inode);
  552.  }
  553.  
  554. @@ -286,9 +300,15 @@
  555.  static int __init rfs_init_inodecache(void)
  556.  {
  557.         rfs_inode_cachep = kmem_cache_create("rfs_inode_cache",
  558. -                                               sizeof(struct rfs_inode_info),
  559. -                                               0, SLAB_RECLAIM_ACCOUNT,
  560. -                                               init_once, NULL);
  561. +                       sizeof(struct rfs_inode_info),
  562. +#ifdef RFS_FOR_2_6_23
  563. +                       0, (SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD),
  564. +                       init_once);
  565. +#else
  566. +                       0, SLAB_RECLAIM_ACCOUNT,
  567. +                       init_once, NULL);
  568. +#endif
  569. +
  570.         if (!rfs_inode_cachep)
  571.                 return -ENOMEM;
  572.  
  573. @@ -316,7 +336,11 @@
  574.  {
  575.         struct rfs_inode_info *new;
  576.  
  577. +#ifdef RFS_FOR_2_6_20
  578. +       new = kmem_cache_alloc(rfs_inode_cachep, GFP_KERNEL);
  579. +#else
  580.         new = kmem_cache_alloc(rfs_inode_cachep, SLAB_KERNEL);
  581. +#endif
  582.         if (!new)
  583.                 return NULL;
  584.  
  585. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/file.c
  586. ===================================================================
  587. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/file.c        (Revision 1229)
  588. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/file.c        (Arbeitskopie)
  589. @@ -498,7 +498,11 @@
  590.   * System file (log or pool file) can not be accessed
  591.   */
  592.  #ifdef RFS_FOR_2_6
  593. +#ifdef RFS_FOR_2_6_27
  594. +int rfs_permission(struct inode *inode, int mode)
  595. +#else
  596.  int rfs_permission(struct inode *inode, int mode, struct nameidata *nd)
  597. +#endif
  598.  #else
  599.  int rfs_permission(struct inode *inode, int mode)
  600.  #endif
  601. @@ -530,7 +534,11 @@
  602.         ssize_t ret;
  603.         int err;
  604.  
  605. +#ifdef RFS_FOR_2_6_19
  606. +       ret = do_sync_write(file, buf, count, ppos);
  607. +#else
  608.         ret = generic_file_write(file, buf, count, ppos);
  609. +#endif
  610.         if (ret <= 0)
  611.                 return ret;
  612.  
  613. @@ -590,7 +598,13 @@
  614.  #endif
  615.  
  616.  struct file_operations rfs_file_operations = {
  617. +#ifdef RFS_FOR_2_6_19
  618. +       .read           = do_sync_read,
  619. +       .aio_read       = generic_file_aio_read,
  620. +       .aio_write      = generic_file_aio_write,
  621. +#else
  622.         .read           = generic_file_read,
  623. +#endif
  624.         .write          = rfs_file_write,
  625.         .mmap           = generic_file_mmap,
  626.         .fsync          = rfs_file_fsync,
  627. @@ -660,7 +674,7 @@
  628.         if (ret) {
  629.                 RFS_I(inode)->mmu_private -= sb->s_blocksize;
  630.                 RFS_BUG("iblock(%ld) doesn't have a physical mapping",
  631. -                               iblock);
  632. +                               (long int)iblock);
  633.                 goto out;
  634.         }
  635.  
  636. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/cluster.c
  637. ===================================================================
  638. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/cluster.c     (Revision 1229)
  639. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/cluster.c     (Arbeitskopie)
  640. @@ -442,7 +442,7 @@
  641.  
  642.                 if (next < VALID_CLU) { /* out-of-range input */
  643.                         fat_unlock(sb);
  644. -                       RFS_BUG("fat entry(%u) was corrupted\n", next);
  645. +                       RFS_BUG("fat entry(%u) was corrupted\nTry to repair your partition with: fsck.vfat -a\n", next);
  646.                         return -EIO;
  647.                 }
  648.  
  649. @@ -617,6 +617,15 @@
  650.         return err;
  651.  }
  652.  
  653. +/* in /I5700_Eclair_KernelOpenSource/modules/xsr/xsr_base.c
  654. + * we have:
  655. + * #ifndef CONFIG_RFS_TINYBML
  656. + * int (*xsr_stl_delete)(dev_t dev, u32 start, u32 nums, u32 b_size) = NULL;
  657. + *
  658. + * EXPORT_SYMBOL(xsr_stl_delete);
  659. + * #endif
  660. + * so what now?
  661. + */
  662.  #ifdef CONFIG_RFS_MAPDESTROY
  663.  extern int (*xsr_stl_delete)(dev_t dev, u32 start, u32 nums, u32 b_size);
  664.  #endif
  665. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/Makefile.26
  666. ===================================================================
  667. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/Makefile.26   (Revision 1229)
  668. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/Makefile.26   (Arbeitskopie)
  669. @@ -2,9 +2,22 @@
  670.  # Makefile for the linux rfs-filesystem (kernel 2.6)
  671.  #
  672.  
  673. -obj-$(CONFIG_RFS_FS)   += rfs.o
  674. +obj-$(CONFIG_RFS_FS)    += rfs.o
  675.  
  676. -rfs-y          += cluster.o code_convert.o dos.o
  677. -rfs-y          += dir.o file.o inode.o namei.o super.o
  678. -rfs-y          += log.o log_replay.o
  679. -rfs-y          += rfs_26.o
  680. +rfs-y           += fcache.o cluster.o code_convert.o dos.o
  681. +rfs-y           += dir.o file.o inode_26.o inode.o namei.o super.o
  682. +rfs-y           += log.o log_replay.o
  683. +rfs-y           += rfs_26.o
  684. +#ifdef CONFIG_PROC_FS
  685. +rfs-y           += misc.o
  686. +#endif
  687. +ifdef CONFIG_RFS_FS_XATTR
  688. +       rfs-y           += xattr.o xattr_user.o xattr_trusted.o
  689. +endif
  690. +#ifdef CONFIG_RFS_FS_POSIX_ACL
  691. +rfs-y           +=
  692. +#endif
  693. +ifdef CONFIG_RFS_FS_SECURITY
  694. +       rfs-y           += xattr_security.o
  695. +endif
  696. +
  697. Index: RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/dos.c
  698. ===================================================================
  699. --- RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/dos.c (Revision 1229)
  700. +++ RFS_1.2.2p1-rc2_kernel_m64_SamyGO_port/fs/rfs/dos.c (Arbeitskopie)
  701. @@ -153,7 +153,7 @@
  702.   * @param i    offset of target bit
  703.   * @return     none
  704.   */
  705. -static inline void bitmap_set(unsigned char *bitmap, int i)
  706. +static inline void rfs_bitmap_set(unsigned char *bitmap, int i)
  707.  {
  708.         bitmap[i >> 3]  |= (0x01 << (i & 0x7));
  709.  }
  710. @@ -282,7 +282,7 @@
  711.         int err = 0;
  712.  
  713.         bitmap_clear_all(bmap, (MAX_NUMERIC >> 3));
  714. -       bitmap_set(bmap, 0);
  715. +       rfs_bitmap_set(bmap, 0);
  716.  
  717.         while (1) {
  718.                 ep = get_entry(dir, cpos++, &bh);
  719. @@ -318,7 +318,7 @@
  720.                 }
  721.  
  722.                 if (count)
  723. -                       bitmap_set(bmap, count);
  724. +                       rfs_bitmap_set(bmap, count);
  725.         }
  726.  
  727.         for (count = 0, i = 0; (!count) && (i < (MAX_NUMERIC >> 3)); i++) {
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top