1 diff -r -u linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c
2 --- linux-stage.orig/fs/ext4/super.c 2012-12-31 12:55:18.000000000 -0500
3 +++ linux-stage/fs/ext4/super.c 2012-12-31 12:56:14.000000000 -0500
5 static struct mutex ext4_li_mtx;
6 static struct ext4_features *ext4_feat;
8 +static int force_over_128tb;
10 static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
11 unsigned long journal_devnum);
12 static int ext4_commit_super(struct super_block *sb, int sync);
14 Opt_nomblk_io_submit, Opt_block_validity, Opt_noblock_validity,
15 Opt_inode_readahead_blks, Opt_journal_ioprio,
16 Opt_dioread_nolock, Opt_dioread_lock,
17 - Opt_mballoc, Opt_bigendian_extents,
18 + Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
19 Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
23 {Opt_dioread_nolock, "dioread_nolock"},
24 {Opt_dioread_lock, "dioread_lock"},
25 {Opt_bigendian_extents, "bigendian_extents"},
26 + {Opt_force_over_128tb, "force_over_128tb"},
27 {Opt_mballoc, "mballoc"},
28 {Opt_discard, "discard"},
29 {Opt_nodiscard, "nodiscard"},
34 + case Opt_force_over_128tb:
35 + force_over_128tb = 1;
38 ext4_msg(sb, KERN_ERR,
39 "Unrecognized mount option \"%s\" "
40 @@ -3394,6 +3400,16 @@
44 + if (ext4_blocks_count(es) > (8ULL << 32)) {
45 + if (force_over_128tb == 0) {
46 + printk(KERN_ERR "EXT4-fs does not support filesystems "
47 + "greater than 128TB and can cause data corruption."
48 + "Use \"force_over_128tb\" mount option to override."
54 if (EXT4_BLOCKS_PER_GROUP(sb) == 0)