From 79ec0a1df07733183f19d71813f99306b31f3636 Mon Sep 17 00:00:00 2001 From: Yu Jian Date: Fri, 8 Jul 2011 16:11:18 +0800 Subject: [PATCH] LU-136 change "force_over_16tb" mount option to "force_over_128tb" Change the "force_over_16tb" mount option to "force_over_128tb" and rename the ext4-force_over_16tb-*.patch to ext4-force_over_128tb-*.patch after testing and validating the 128TB LUN. Signed-off-by: Yu Jian Change-Id: I19c73280cf2934112aefab8976d7eac18915529a Reviewed-on: http://review.whamcloud.com/1073 Reviewed-by: Andreas Dilger Tested-by: Hudson Reviewed-by: Oleg Drokin --- .../patches/ext4-disable-mb-cache-rhel5.patch | 4 ++-- .../patches/ext4-disable-mb-cache-rhel6.patch | 2 +- .../patches/ext4-extents-mount-option-rhel5.patch | 8 ++++---- .../patches/ext4-extents-mount-option-rhel6.patch | 6 +++--- ...b-rhel5.patch => ext4-force_over_128tb-rhel5.patch} | 18 +++++++++--------- ...b-rhel6.patch => ext4-force_over_128tb-rhel6.patch} | 18 +++++++++--------- .../series/ldiskfs-2.6-rhel5-ext4.series | 2 +- ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series | 2 +- 8 files changed, 30 insertions(+), 30 deletions(-) rename ldiskfs/kernel_patches/patches/{ext4-force_over_16tb-rhel5.patch => ext4-force_over_128tb-rhel5.patch} (78%) rename ldiskfs/kernel_patches/patches/{ext4-force_over_16tb-rhel6.patch => ext4-force_over_128tb-rhel6.patch} (77%) 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 e04b125..9a0d61a 100644 --- a/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel5.patch +++ b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel5.patch @@ -115,7 +115,7 @@ Index: 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_128tb, + Opt_no_mbcache, }; @@ -123,7 +123,7 @@ Index: linux-stage/fs/ext4/super.c @@ -1554,6 +1555,7 @@ 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_128tb, "force_over_128tb"}, + {Opt_no_mbcache, "no_mbcache"}, {Opt_err, NULL}, }; diff --git a/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel6.patch b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel6.patch index 8c98c62..ee25925 100644 --- a/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel6.patch +++ b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel6.patch @@ -19,7 +19,7 @@ Index: linux-stage/fs/ext4/super.c @@ -1502,6 +1502,7 @@ Opt_inode_readahead_blks, Opt_journal_ioprio, Opt_discard, Opt_nodiscard, - Opt_mballoc, Opt_bigendian_extents, Opt_force_over_16tb, + Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb, + Opt_no_mbcache, Opt_extents, Opt_noextents, }; 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..f83b26a 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_128tb, + 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_128tb, "force_over_128tb"}, + {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_128tb: + force_over_128tb = 1; break; + case Opt_extents: + if (!EXT4_HAS_INCOMPAT_FEATURE(sb, diff --git a/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-rhel6.patch b/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-rhel6.patch index e944013..a40b8a2 100644 --- a/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-rhel6.patch +++ b/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-rhel6.patch @@ -96,7 +96,7 @@ Index: linux-stage/fs/ext4/super.c @@ -1515,6 +1517,7 @@ enum { Opt_inode_readahead_blks, Opt_journal_ioprio, Opt_discard, Opt_nodiscard, - Opt_mballoc, Opt_bigendian_extents, Opt_force_over_16tb, + Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb, + Opt_extents, Opt_noextents, }; @@ -119,8 +119,8 @@ Index: linux-stage/fs/ext4/super.c if (!options) return 1; @@ -2039,6 +2045,32 @@ set_qf_format: - case Opt_force_over_16tb: - force_over_16tb = 1; + case Opt_force_over_128tb: + force_over_128tb = 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_128tb-rhel5.patch similarity index 78% rename from ldiskfs/kernel_patches/patches/ext4-force_over_16tb-rhel5.patch rename to ldiskfs/kernel_patches/patches/ext4-force_over_128tb-rhel5.patch index 4ea9b247..487b2cc 100644 --- a/ldiskfs/kernel_patches/patches/ext4-force_over_16tb-rhel5.patch +++ b/ldiskfs/kernel_patches/patches/ext4-force_over_128tb-rhel5.patch @@ -6,7 +6,7 @@ Index: linux-2.6.18-164.6.1/fs/ext4/super.c struct proc_dir_entry *ext4_proc_root; -+static int force_over_16tb; ++static int force_over_128tb; + static int ext4_load_journal(struct super_block *, struct ext4_super_block *, unsigned long journal_devnum); @@ -15,7 +15,7 @@ Index: linux-2.6.18-164.6.1/fs/ext4/super.c 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, ++ Opt_force_over_128tb, }; static match_table_t tokens = { @@ -23,7 +23,7 @@ Index: linux-2.6.18-164.6.1/fs/ext4/super.c {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_force_over_128tb, "force_over_128tb"}, {Opt_err, NULL}, }; @@ -31,8 +31,8 @@ Index: linux-2.6.18-164.6.1/fs/ext4/super.c break; case Opt_mballoc: break; -+ case Opt_force_over_16tb: -+ force_over_16tb = 1; ++ case Opt_force_over_128tb: ++ force_over_128tb = 1; + break; default: printk(KERN_ERR @@ -41,11 +41,11 @@ Index: linux-2.6.18-164.6.1/fs/ext4/super.c goto failed_mount; } -+ if (ext4_blocks_count(es) >= (1ULL << 32)) { -+ if (force_over_16tb == 0) { ++ if (ext4_blocks_count(es) > (8ULL << 32)) { ++ if (force_over_128tb == 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." ++ "greater than 128TB and can cause data corruption." ++ "Use \"force_over_128tb\" mount option to override." + "\n"); + goto failed_mount; + } diff --git a/ldiskfs/kernel_patches/patches/ext4-force_over_16tb-rhel6.patch b/ldiskfs/kernel_patches/patches/ext4-force_over_128tb-rhel6.patch similarity index 77% rename from ldiskfs/kernel_patches/patches/ext4-force_over_16tb-rhel6.patch rename to ldiskfs/kernel_patches/patches/ext4-force_over_128tb-rhel6.patch index 5e14164..a01f42d 100644 --- a/ldiskfs/kernel_patches/patches/ext4-force_over_16tb-rhel6.patch +++ b/ldiskfs/kernel_patches/patches/ext4-force_over_128tb-rhel6.patch @@ -6,7 +6,7 @@ Index: linux-stage/fs/ext4/super.c struct proc_dir_entry *ext4_proc_root; static struct kset *ext4_kset; -+static int force_over_16tb; ++static int force_over_128tb; + static int ext4_load_journal(struct super_block *, struct ext4_super_block *, unsigned long journal_devnum); @@ -16,7 +16,7 @@ Index: linux-stage/fs/ext4/super.c Opt_inode_readahead_blks, Opt_journal_ioprio, Opt_discard, Opt_nodiscard, - Opt_mballoc, Opt_bigendian_extents, -+ Opt_mballoc, Opt_bigendian_extents, Opt_force_over_16tb, ++ Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb, }; static const match_table_t tokens = { @@ -24,7 +24,7 @@ Index: linux-stage/fs/ext4/super.c {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_force_over_128tb, "force_over_128tb"}, {Opt_mballoc, "mballoc"}, {Opt_discard, "discard"}, {Opt_nodiscard, "nodiscard"}, @@ -32,8 +32,8 @@ Index: linux-stage/fs/ext4/super.c break; case Opt_mballoc: break; -+ case Opt_force_over_16tb: -+ force_over_16tb = 1; ++ case Opt_force_over_128tb: ++ force_over_128tb = 1; + break; default: ext4_msg(sb, KERN_ERR, @@ -42,11 +42,11 @@ Index: linux-stage/fs/ext4/super.c goto failed_mount; } -+ if (ext4_blocks_count(es) >= (1ULL << 32)) { -+ if (force_over_16tb == 0) { ++ if (ext4_blocks_count(es) > (8ULL << 32)) { ++ if (force_over_128tb == 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." ++ "greater than 128TB and can cause data corruption." ++ "Use \"force_over_128tb\" mount option to override." + "\n"); + goto failed_mount; + } 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 963e9eb..58cc4fd 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series @@ -14,7 +14,7 @@ ext4-mballoc-extra-checks-rhel5.patch ext4-misc-rhel5.patch ext4-big-endian-check-2.6-rhel5.patch ext4-alloc-policy-2.6-rhel5.patch -ext4-force_over_16tb-rhel5.patch +ext4-force_over_128tb-rhel5.patch ext4-pdir-fix.patch ext4-osd-iop-common.patch ext4-osd-iam-exports.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series index 2c73ff1..32a7bf2 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series @@ -14,7 +14,7 @@ ext4-mballoc-extra-checks-rhel6.patch ext4-misc-rhel6.patch ext4-big-endian-check-2.6-rhel6.patch ext4-alloc-policy-2.6-rhel5.patch -ext4-force_over_16tb-rhel6.patch +ext4-force_over_128tb-rhel6.patch ext4-pdir-fix-rhel6.patch ext4-osd-iop-common-rhel6.patch ext4-osd-iam-exports-rhel6.patch -- 1.8.3.1