From 54f6838fcf36268dadbbbbfa80a95343d5f89ab6 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Fri, 11 Jul 2008 19:27:31 -0400 Subject: [PATCH] --- yaml --- r: 101123 b: refs/heads/master c: c07651b556323e0e763c452587fe29d2b034b314 h: refs/heads/master i: 101121: 63a70d259add2fbf8fc839ed793a4dd251b6648c 101119: 763494f1495b368fb1a4fd789a6f42cd6172c167 v: v3 --- [refs] | 2 +- trunk/fs/ext4/super.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f3e6f04389bf..7e36c9a8f18a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dd919b9822c5fd9fd72f95a602440130297c3857 +refs/heads/master: c07651b556323e0e763c452587fe29d2b034b314 diff --git a/trunk/fs/ext4/super.c b/trunk/fs/ext4/super.c index 4e104dd0ec21..2bf9cdd7a036 100644 --- a/trunk/fs/ext4/super.c +++ b/trunk/fs/ext4/super.c @@ -1004,6 +1004,7 @@ static int parse_options (char *options, struct super_block *sb, int qtype, qfmt; char *qname; #endif + ext4_fsblk_t last_block; if (!options) return 1; @@ -1326,6 +1327,20 @@ static int parse_options (char *options, struct super_block *sb, set_opt (sbi->s_mount_opt, EXTENTS); break; case Opt_noextents: + /* + * When e2fsprogs support resizing an already existing + * ext3 file system to greater than 2**32 we need to + * add support to block allocator to handle growing + * already existing block mapped inode so that blocks + * allocated for them fall within 2**32 + */ + last_block = ext4_blocks_count(sbi->s_es) - 1; + if (last_block > 0xffffffffULL) { + printk(KERN_ERR "EXT4-fs: Filesystem too " + "large to mount with " + "-o noextents options\n"); + return 0; + } clear_opt (sbi->s_mount_opt, EXTENTS); break; case Opt_i_version: