1 Index: linux-stage/fs/ext4/super.c
2 ===================================================================
3 --- linux-stage.orig/fs/ext4/super.c 2011-03-11 15:35:15.680343230 +0800
4 +++ linux-stage/fs/ext4/super.c 2011-03-11 15:44:45.037632078 +0800
6 struct proc_dir_entry *ext4_proc_root;
7 static struct kset *ext4_kset;
9 +static int force_over_16tb;
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, int sync);
15 Opt_block_validity, Opt_noblock_validity,
16 Opt_inode_readahead_blks, Opt_journal_ioprio,
17 Opt_discard, Opt_nodiscard,
18 - Opt_mballoc, Opt_bigendian_extents,
19 + Opt_mballoc, Opt_bigendian_extents, Opt_force_over_16tb,
22 static const match_table_t tokens = {
24 {Opt_auto_da_alloc, "auto_da_alloc"},
25 {Opt_noauto_da_alloc, "noauto_da_alloc"},
26 {Opt_bigendian_extents, "bigendian_extents"},
27 + {Opt_force_over_16tb, "force_over_16th"},
28 {Opt_mballoc, "mballoc"},
29 {Opt_discard, "discard"},
30 {Opt_nodiscard, "nodiscard"},
35 + case Opt_force_over_16tb:
36 + force_over_16tb = 1;
39 ext4_msg(sb, KERN_ERR,
40 "Unrecognized mount option \"%s\" "
41 @@ -3031,6 +3037,26 @@
45 + if (ext4_blocks_count(es) >= (1ULL << 32)) {
46 + if (force_over_16tb == 0) {
47 + printk(KERN_ERR "EXT4-fs does not support filesystems "
48 + "greater than 16TB and can cause data corruption."
49 + "Use \"force_over_16tb\" mount option to override."
55 + if (ext4_blocks_count(es) >= (1ULL << 32)) {
56 + if (force_over_16tb == 0) {
57 + printk(KERN_ERR "EXT4-fs does not support filesystems "
58 + "greater than 16TB and can cause data corruption."
59 + "Use \"force_over_16tb\" mount option to override."
65 if (EXT4_BLOCKS_PER_GROUP(sb) == 0)