Whamcloud - gitweb
b=17569
authorgirish <girish>
Wed, 1 Jul 2009 10:07:42 +0000 (10:07 +0000)
committergirish <girish>
Wed, 1 Jul 2009 10:07:42 +0000 (10:07 +0000)
i=adilger
i=johann

add check for >8TB filesystem

ldiskfs/kernel_patches/patches/ext3-force_over_8tb-2.6.22.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext3-force_over_8tb-rhel5.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext3-force_over_8tb-sles10.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series
ldiskfs/kernel_patches/series/ldiskfs-2.6.22-vanilla.series

diff --git a/ldiskfs/kernel_patches/patches/ext3-force_over_8tb-2.6.22.patch b/ldiskfs/kernel_patches/patches/ext3-force_over_8tb-2.6.22.patch
new file mode 100644 (file)
index 0000000..27a8d57
--- /dev/null
@@ -0,0 +1,58 @@
+Index: linux-2.6.22.14/fs/ext3/super.c
+===================================================================
+--- linux-2.6.22.14.orig/fs/ext3/super.c       2009-07-01 14:04:44.000000000 +0530
++++ linux-2.6.22.14/fs/ext3/super.c    2009-07-01 14:05:33.000000000 +0530
+@@ -51,6 +51,8 @@
+ #define EXT3_DEFAULT_MAX_DIR_SIZE             0
+ #define EXT3_MAX_DIR_SIZE_NAME                "max_dir_size"
++static int force_over_8tb;
++
+ static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
+                            unsigned long journal_devnum);
+ static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
+@@ -711,7 +713,7 @@
+       Opt_grpquota,
+       Opt_extents, Opt_noextents, Opt_bigendian_extents, Opt_extdebug,
+       Opt_mballoc, Opt_nomballoc, Opt_stripe,
+-      Opt_hashfunc,
++      Opt_hashfunc, Opt_force_over_8tb,
+ };
+ static match_table_t tokens = {
+@@ -771,6 +773,7 @@
+       {Opt_mballoc, "mballoc"},
+       {Opt_nomballoc, "nomballoc"},
+       {Opt_stripe, "stripe=%u"},
++      {Opt_force_over_8tb, "force_over_8tb"},
+       {Opt_err, NULL},
+       {Opt_resize, "resize"},
+       {Opt_hashfunc,"hash=%s"},
+@@ -1158,6 +1161,9 @@
+                                 return 0;
+                         }
+                       break;
++              case Opt_force_over_8tb:
++                      force_over_8tb = 1;
++                      break;
+               default:
+                       printk (KERN_ERR
+                               "EXT3-fs: Unrecognized mount option \"%s\" "
+@@ -2254,6 +2260,17 @@
+               goto failed_mount;
+       }
++      if (le32_to_cpu(es->s_blocks_count) >
++          ((0x80000000000ULL >> sb->s_blocksize_bits) - 1)) {
++              if (force_over_8tb == 0) {
++                      printk(KERN_ERR "EXT3-fs does not support filesystems "
++                             "greater than 8TB and can cause data corruption."
++                             "Use \"force_over_8tb\" mount option to override."
++                             "\n");
++                      goto failed_mount;
++              }
++      }
++
+       if (EXT3_BLOCKS_PER_GROUP(sb) == 0)
+               goto cantfind_ext3;
+       sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
diff --git a/ldiskfs/kernel_patches/patches/ext3-force_over_8tb-rhel5.patch b/ldiskfs/kernel_patches/patches/ext3-force_over_8tb-rhel5.patch
new file mode 100644 (file)
index 0000000..bf33ca7
--- /dev/null
@@ -0,0 +1,57 @@
+Index: linux-2.6.18-128.1.6/fs/ext3/super.c
+===================================================================
+--- linux-2.6.18-128.1.6.orig/fs/ext3/super.c  2009-07-01 13:55:03.000000000 +0530
++++ linux-2.6.18-128.1.6/fs/ext3/super.c       2009-07-01 13:56:32.000000000 +0530
+@@ -51,6 +51,8 @@
+ #define EXT3_DEFAULT_MAX_DIR_SIZE             0
+ #define EXT3_MAX_DIR_SIZE_NAME                "max_dir_size"
++static int force_over_8tb;
++
+ static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
+                            unsigned long journal_devnum);
+ static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
+@@ -722,6 +724,7 @@
+       Opt_grpquota,
+       Opt_extents, Opt_noextents, Opt_bigendian_extents, Opt_extdebug,
+       Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_hashfunc,
++      Opt_force_over_8tb,
+ };
+ static match_table_t tokens = {
+@@ -785,6 +788,7 @@
+       {Opt_mballoc, "mballoc"},
+       {Opt_nomballoc, "nomballoc"},
+       {Opt_stripe, "stripe=%u"},
++      {Opt_force_over_8tb, "force_over_8tb"},
+       {Opt_err, NULL},
+       {Opt_resize, "resize"},
+       {Opt_hashfunc,"hash=%s"},
+@@ -1181,6 +1185,9 @@
+                                 return 0;
+                         }
+                       break;
++              case Opt_force_over_8tb:
++                      force_over_8tb = 1;
++                      break;
+               default:
+                       printk (KERN_ERR
+                               "EXT3-fs: Unrecognized mount option \"%s\" "
+@@ -2274,6 +2281,17 @@
+               goto failed_mount;
+       }
++      if (le32_to_cpu(es->s_blocks_count) >
++          ((0x80000000000ULL >> sb->s_blocksize_bits) - 1)) {
++              if (force_over_8tb == 0) {
++                      printk(KERN_ERR "EXT3-fs does not support filesystems "
++                             "greater than 8TB and can cause data corruption."
++                             "Use \"force_over_8tb\" mount option to override."
++                             "\n");
++                      goto failed_mount;
++              }
++      }
++
+       if (EXT3_BLOCKS_PER_GROUP(sb) == 0)
+               goto cantfind_ext3;
+       sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
diff --git a/ldiskfs/kernel_patches/patches/ext3-force_over_8tb-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-force_over_8tb-sles10.patch
new file mode 100644 (file)
index 0000000..5cbaf52
--- /dev/null
@@ -0,0 +1,58 @@
+Index: linux-2.6.16.60-0.37/fs/ext3/super.c
+===================================================================
+--- linux-2.6.16.60-0.37.orig/fs/ext3/super.c  2009-07-01 14:00:38.000000000 +0530
++++ linux-2.6.16.60-0.37/fs/ext3/super.c       2009-07-01 14:03:03.000000000 +0530
+@@ -52,6 +52,8 @@
+ #define EXT3_DEFAULT_MAX_DIR_SIZE             0
+ #define EXT3_MAX_DIR_SIZE_NAME                "max_dir_size"
++static int force_over_8tb;
++
+ static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
+                            unsigned long journal_devnum);
+ static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
+@@ -714,7 +716,7 @@
+       Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
+       Opt_extents, Opt_noextents, Opt_bigendian_extents, Opt_extdebug,
+       Opt_mballoc, Opt_nomballoc, Opt_stripe,
+-      Opt_grpquota, Opt_hashfunc
++      Opt_grpquota, Opt_hashfunc, Opt_force_over_8tb
+ };
+ static match_table_t tokens = {
+@@ -777,6 +779,7 @@
+       {Opt_mballoc, "mballoc"},
+       {Opt_nomballoc, "nomballoc"},
+       {Opt_stripe, "stripe=%u"},
++      {Opt_force_over_8tb, "force_over_8tb"},
+       {Opt_err, NULL},
+       {Opt_resize, "resize"},
+       {Opt_hashfunc,"hash=%s"},
+@@ -1169,6 +1172,9 @@
+                                 return 0;
+                         }
+                       break;
++              case Opt_force_over_8tb:
++                      force_over_8tb = 1;
++                      break;
+               default:
+                       printk (KERN_ERR
+                               "EXT3-fs: Unrecognized mount option \"%s\" "
+@@ -2257,6 +2263,17 @@
+               goto failed_mount;
+       }
++      if (le32_to_cpu(es->s_blocks_count) >
++          ((0x80000000000ULL >> sb->s_blocksize_bits) - 1)) {
++              if (force_over_8tb == 0) {
++                      printk(KERN_ERR "EXT3-fs does not support filesystems "
++                             "greater than 8TB and can cause data corruption."
++                             "Use \"force_over_8tb\" mount option to override."
++                             "\n");
++                      goto failed_mount;
++              }
++      }
++
+       if (EXT3_BLOCKS_PER_GROUP(sb) == 0)
+               goto cantfind_ext3;
+       sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) -
index 4949de3..26de1b0 100644 (file)
@@ -31,3 +31,4 @@ ext3-get-raid-stripe-from-sb.patch
 ext3-big-endian-check-2.6-rhel5.patch
 ext3-remove-del_entry-space.patch
 ext3-osd-iop-common.patch
+ext3-force_over_8tb-rhel5.patch
index 5a179b6..17b45eb 100644 (file)
@@ -35,3 +35,4 @@ ext3-fiemap-2.6-sles10.patch
 ext3-get-raid-stripe-from-sb.patch
 ext3-big-endian-check-2.6-sles10.patch
 ext3-osd-iop-common.patch
+ext3-force_over_8tb-sles10.patch
index 9a37e1f..5bc8857 100644 (file)
@@ -30,3 +30,4 @@ ext3-fiemap-2.6.22-vanilla.patch
 ext3-get-raid-stripe-from-sb.patch
 ext3-big-endian-check-2.6.22-vanilla.patch
 ext3-osd-iop-common.patch
+ext3-force_over_8tb-2.6.22.patch