1 Index: linux-2.6.18-164.6.1/fs/ext4/super.c
2 ===================================================================
3 --- linux-2.6.18-164.6.1.orig/fs/ext4/super.c
4 +++ linux-2.6.18-164.6.1/fs/ext4/super.c
7 struct proc_dir_entry *ext4_proc_root;
9 +static int force_over_128tb;
11 static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
12 unsigned long journal_devnum);
13 static int ext4_commit_super(struct super_block *sb,
14 @@ -1343,6 +1345,7 @@ enum {
15 Opt_stripe, Opt_delalloc, Opt_nodelalloc,
16 Opt_inode_readahead_blks, Opt_journal_ioprio,
17 Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, Opt_bigendian_extents,
18 + Opt_force_over_128tb,
21 static match_table_t tokens = {
22 @@ -1410,6 +1413,7 @@ static match_table_t tokens = {
23 {Opt_auto_da_alloc, "auto_da_alloc"},
24 {Opt_noauto_da_alloc, "noauto_da_alloc"},
25 {Opt_bigendian_extents, "bigendian_extents"},
26 + {Opt_force_over_128tb, "force_over_128tb"},
30 @@ -1837,6 +1841,9 @@ set_qf_format:
34 + case Opt_force_over_128tb:
35 + force_over_128tb = 1;
39 "EXT4-fs: Unrecognized mount option \"%s\" "
40 @@ -2692,6 +2699,16 @@ static int ext4_fill_super(struct super_
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)