From bd5a07010489666d7adf79c074f2dbd694f49f4a Mon Sep 17 00:00:00 2001 From: Yu Jian Date: Mon, 23 May 2011 17:41:40 +0800 Subject: [PATCH] LU-136 change "force_over_16tb" mount option to "force_over_24tb" Change the "force_over_16tb" mount option to "force_over_24tb" and rename the ext4-force_over_16tb-*.patch to ext4-force_over_24tb-*.patch after testing and validating the 24TB LUN. Signed-off-by: Yu Jian Change-Id: Ia1731216a0c5fd2e0de4ec46c4cbd32bcd7c691d Reviewed-on: http://review.whamcloud.com/589 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger --- .../patches/ext4-disable-mb-cache-rhel5.patch | 4 +- .../patches/ext4-extents-mount-option-rhel5.patch | 8 ++-- .../patches/ext4-force_over_16tb-rhel5.patch | 56 ---------------------- .../patches/ext4-force_over_24tb-rhel5.patch | 56 ++++++++++++++++++++++ .../series/ldiskfs-2.6-rhel5-ext4.series | 2 +- 5 files changed, 63 insertions(+), 63 deletions(-) delete mode 100644 ldiskfs/kernel_patches/patches/ext4-force_over_16tb-rhel5.patch create mode 100644 ldiskfs/kernel_patches/patches/ext4-force_over_24tb-rhel5.patch diff --git a/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel5.patch index 9229cd2..087266d 100644 --- a/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel5.patch +++ b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel5.patch @@ -114,14 +114,14 @@ Index: linux-stage/fs/ext4/super.c +++ linux-stage/fs/ext4/super.c @@ -1481,6 +1481,7 @@ enum { Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, Opt_bigendian_extents, - Opt_force_over_16tb, + Opt_force_over_24tb, Opt_extents, Opt_noextents, + Opt_no_mbcache, }; static match_table_t tokens = { @@ -1554,6 +1555,7 @@ static match_table_t tokens = { - {Opt_force_over_16tb, "force_over_16tb"}, + {Opt_force_over_24tb, "force_over_24tb"}, {Opt_extents, "extents"}, {Opt_noextents, "noextents"}, + {Opt_no_mbcache, "no_mbcache"}, diff --git a/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-rhel5.patch index be276ae..233edf4 100644 --- a/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-rhel5.patch +++ b/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-rhel5.patch @@ -93,7 +93,7 @@ diff -up linux-2.6.18-164/fs/ext4/super.c linux-2.6.18-164/fs/ext4/super.c @@ -1334,6 +1336,7 @@ enum { Opt_inode_readahead_blks, Opt_journal_ioprio, Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, Opt_bigendian_extents, - Opt_force_over_16tb, + Opt_force_over_24tb, + Opt_extents, Opt_noextents, }; @@ -101,7 +101,7 @@ diff -up linux-2.6.18-164/fs/ext4/super.c linux-2.6.18-164/fs/ext4/super.c @@ -1401,6 +1404,8 @@ static match_table_t tokens = { {Opt_noauto_da_alloc, "noauto_da_alloc"}, {Opt_bigendian_extents, "bigendian_extents"}, - {Opt_force_over_16tb, "force_over_16tb"}, + {Opt_force_over_24tb, "force_over_24tb"}, + {Opt_extents, "extents"}, + {Opt_noextents, "noextents"}, {Opt_err, NULL}, @@ -116,8 +116,8 @@ diff -up linux-2.6.18-164/fs/ext4/super.c linux-2.6.18-164/fs/ext4/super.c if (!options) return 1; @@ -1829,6 +1835,33 @@ set_qf_format: - case Opt_force_over_16tb: - force_over_16tb = 1; + case Opt_force_over_24tb: + force_over_24tb = 1; break; + case Opt_extents: + if (!EXT4_HAS_INCOMPAT_FEATURE(sb, diff --git a/ldiskfs/kernel_patches/patches/ext4-force_over_16tb-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-force_over_16tb-rhel5.patch deleted file mode 100644 index 4ea9b247..0000000 --- a/ldiskfs/kernel_patches/patches/ext4-force_over_16tb-rhel5.patch +++ /dev/null @@ -1,56 +0,0 @@ -Index: linux-2.6.18-164.6.1/fs/ext4/super.c -=================================================================== ---- linux-2.6.18-164.6.1.orig/fs/ext4/super.c -+++ linux-2.6.18-164.6.1/fs/ext4/super.c -@@ -51,6 +51,8 @@ - - struct proc_dir_entry *ext4_proc_root; - -+static int force_over_16tb; -+ - static int ext4_load_journal(struct super_block *, struct ext4_super_block *, - unsigned long journal_devnum); - static int ext4_commit_super(struct super_block *sb, -@@ -1343,6 +1345,7 @@ enum { - Opt_stripe, Opt_delalloc, Opt_nodelalloc, - Opt_inode_readahead_blks, Opt_journal_ioprio, - Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, Opt_bigendian_extents, -+ Opt_force_over_16tb, - }; - - static match_table_t tokens = { -@@ -1410,6 +1413,7 @@ static match_table_t tokens = { - {Opt_auto_da_alloc, "auto_da_alloc"}, - {Opt_noauto_da_alloc, "noauto_da_alloc"}, - {Opt_bigendian_extents, "bigendian_extents"}, -+ {Opt_force_over_16tb, "force_over_16tb"}, - {Opt_err, NULL}, - }; - -@@ -1837,6 +1841,9 @@ set_qf_format: - break; - case Opt_mballoc: - break; -+ case Opt_force_over_16tb: -+ force_over_16tb = 1; -+ break; - default: - printk(KERN_ERR - "EXT4-fs: Unrecognized mount option \"%s\" " -@@ -2692,6 +2699,16 @@ static int ext4_fill_super(struct super_ - goto failed_mount; - } - -+ if (ext4_blocks_count(es) >= (1ULL << 32)) { -+ if (force_over_16tb == 0) { -+ printk(KERN_ERR "EXT4-fs does not support filesystems " -+ "greater than 16TB and can cause data corruption." -+ "Use \"force_over_16tb\" mount option to override." -+ "\n"); -+ goto failed_mount; -+ } -+ } -+ - if (EXT4_BLOCKS_PER_GROUP(sb) == 0) - goto cantfind_ext4; - diff --git a/ldiskfs/kernel_patches/patches/ext4-force_over_24tb-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-force_over_24tb-rhel5.patch new file mode 100644 index 0000000..7521f2d --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext4-force_over_24tb-rhel5.patch @@ -0,0 +1,56 @@ +Index: linux-stage/fs/ext4/super.c +=================================================================== +--- linux-stage.orig/fs/ext4/super.c ++++ linux-stage/fs/ext4/super.c +@@ -57,6 +57,8 @@ MODULE_PARM_DESC(default_mb_history_leng + + struct proc_dir_entry *ext4_proc_root; + ++static int force_over_24tb; ++ + static int ext4_load_journal(struct super_block *, struct ext4_super_block *, + unsigned long journal_devnum); + static int ext4_commit_super(struct super_block *sb, int sync); +@@ -1151,6 +1153,7 @@ enum { + Opt_block_validity, Opt_noblock_validity, + Opt_inode_readahead_blks, Opt_journal_ioprio, + Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, Opt_bigendian_extents, ++ Opt_force_over_24tb, + }; + + static match_table_t tokens = { +@@ -1222,6 +1225,7 @@ static match_table_t tokens = { + {Opt_auto_da_alloc, "auto_da_alloc"}, + {Opt_noauto_da_alloc, "noauto_da_alloc"}, + {Opt_bigendian_extents, "bigendian_extents"}, ++ {Opt_force_over_24tb, "force_over_24tb"}, + {Opt_err, NULL}, + }; + +@@ -1674,6 +1678,9 @@ set_qf_format: + break; + case Opt_mballoc: + break; ++ case Opt_force_over_24tb: ++ force_over_24tb = 1; ++ break; + default: + ext4_msg(sb, KERN_ERR, + "Unrecognized mount option \"%s\" " +@@ -2715,6 +2722,16 @@ static int ext4_fill_super(struct super_ + goto failed_mount; + } + ++ if (ext4_blocks_count(es) >= (6ULL << 30)) { ++ if (force_over_24tb == 0) { ++ printk(KERN_ERR "EXT4-fs does not support filesystems " ++ "greater than 24TB and can cause data corruption." ++ "Use \"force_over_24tb\" mount option to override." ++ "\n"); ++ goto failed_mount; ++ } ++ } ++ + if (EXT4_BLOCKS_PER_GROUP(sb) == 0) + goto cantfind_ext4; + diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series index 6ba92d3..0115583 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series @@ -15,7 +15,7 @@ ext4-mballoc-extra-checks-rhel5.patch ext4-big-endian-check-2.6-rhel5.patch ext4-alloc-policy-2.6-rhel5.patch ext4-misc-rhel5.patch -ext4-force_over_16tb-rhel5.patch +ext4-force_over_24tb-rhel5.patch ext4-pdir-fix-rhel5.patch ext4-osd-iop-common.patch ext4-osd-iam-exports.patch -- 1.8.3.1