Re: [PATCH 28/31] mke2fs: Complain about creating 64bit filesystems without extents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 30, 2013 at 06:29:46PM -0700, Darrick J. Wong wrote:
> A 64bit filesystem without extents is not terribly useful, because the old
> block map format does not support pointing to high block numbers.  Warn the
> user who tries to create such an animal.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

I moved the check to the PRS() function, which is where the rest of
the feature flag sanity checks are done.  I also removed the !quiet
check, since we aren't doing this for any of the other sanity checks.
I also shortened the error message so that it fits on an 80 column
screen.

						- Ted

commit 51a72e0161c826670e6ee66cb51c2620402098f8
Author: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
Date:   Mon Sep 30 18:29:46 2013 -0700

    mke2fs: complain about creating 64bit filesystems without extents
    
    A 64bit filesystem without extents is not terribly useful, because the
    old block map format does not support pointing to high block numbers.
    Warn the user who tries to create such an animal.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
    Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 22c2815..cc06a97 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1806,6 +1806,14 @@ profile_error:
 		exit(1);
 	}
 
+	/* Check the user's mkfs options for 64bit */
+	if ((fs_param.s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) &&
+	    !(fs_param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS)) {
+		printf(_("Extents MUST be enabled for a 64-bit filesystem.  "
+			 "Pass -O extents to rectify.\n"));
+		exit(1);
+	}
+
 	/* Set first meta blockgroup via an environment variable */
 	/* (this is mostly for debugging purposes) */
 	if ((fs_param.s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) &&
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux