1 Index: linux-2.6.16.60-0.37/fs/ext3/super.c
2 ===================================================================
3 --- linux-2.6.16.60-0.37.orig/fs/ext3/super.c
4 +++ linux-2.6.16.60-0.37/fs/ext3/super.c
6 #define EXT3_DEFAULT_MAX_DIR_SIZE 0
7 #define EXT3_MAX_DIR_SIZE_NAME "max_dir_size"
9 +static int force_over_8tb;
11 static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
12 unsigned long journal_devnum);
13 static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
14 @@ -710,7 +710,7 @@ enum {
15 Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
17 Opt_extents, Opt_noextents, Opt_bigendian_extents, Opt_extdebug,
18 - Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_maxdirsize
19 + Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_maxdirsize, Opt_force_over_8tb,
22 static match_table_t tokens = {
23 @@ -773,6 +773,7 @@ static match_table_t tokens = {
24 {Opt_mballoc, "mballoc"},
25 {Opt_nomballoc, "nomballoc"},
26 {Opt_stripe, "stripe=%u"},
27 + {Opt_force_over_8tb, "force_over_8tb"},
28 {Opt_resize, "resize"},
29 {Opt_maxdirsize, "maxdirsize=%u"},
31 @@ -1156,6 +1157,9 @@ clear_qf_name:
33 sbi->s_max_dir_size = option;
35 + case Opt_force_over_8tb:
40 "EXT3-fs: Unrecognized mount option \"%s\" "
41 @@ -2242,6 +2246,17 @@ static int ext3_fill_super (struct super
45 + if (le32_to_cpu(es->s_blocks_count) >
46 + ((0x80000000000ULL >> sb->s_blocksize_bits) - 1)) {
47 + if (force_over_8tb == 0) {
48 + printk(KERN_ERR "EXT3-fs does not support filesystems "
49 + "greater than 8TB and can cause data corruption."
50 + "Use \"force_over_8tb\" mount option to override."
56 if (EXT3_BLOCKS_PER_GROUP(sb) == 0)
58 sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) -