1 Index: linux-2.6.18-128.1.6/fs/ext3/super.c
2 ===================================================================
3 --- linux-2.6.18-128.1.6.orig/fs/ext3/super.c
4 +++ linux-2.6.18-128.1.6/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 @@ -715,7 +717,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 @@ -779,5 +781,6 @@ 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"},
30 @@ -1157,6 +1160,9 @@ clear_qf_name:
32 sbi->s_max_dir_size = option;
34 + case Opt_force_over_8tb:
39 "EXT3-fs: Unrecognized mount option \"%s\" "
40 @@ -2248,6 +2254,17 @@ static int ext3_fill_super (struct super
44 + if (le32_to_cpu(es->s_blocks_count) >
45 + ((0x80000000000ULL >> sb->s_blocksize_bits) - 1)) {
46 + if (force_over_8tb == 0) {
47 + printk(KERN_ERR "EXT3-fs does not support filesystems "
48 + "greater than 8TB and can cause data corruption."
49 + "Use \"force_over_8tb\" mount option to override."
55 if (EXT3_BLOCKS_PER_GROUP(sb) == 0)
57 sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -