From patchwork Sat Oct 12 01:14:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 282966 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E35512C00B8 for ; Sat, 12 Oct 2013 12:15:03 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754106Ab3JLBPC (ORCPT ); Fri, 11 Oct 2013 21:15:02 -0400 Received: from imap.thunk.org ([74.207.234.97]:45058 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751742Ab3JLBPC (ORCPT ); Fri, 11 Oct 2013 21:15:02 -0400 Received: from root (helo=closure.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.80) (envelope-from ) id 1VUnnF-0003H5-ER; Sat, 12 Oct 2013 01:14:57 +0000 Received: by closure.thunk.org (Postfix, from userid 15806) id 46C7B580702; Fri, 11 Oct 2013 21:14:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=thunk.org; s=mail; t=1381540496; bh=ySv3hfoQ/JY9gxkbTrSREOM/ZHfzbmTSIDOXBqLtebI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fpnhALYPoxdjIdVfB14Py8XNhRkxNOExbrX5bU7Cv++f3NpRCIYcYAp+yeKv2BuLe fo99AtT5yWWixxA0wHlY0oUkbZTVOL39NOUvuzaptFygcUZS4/msr9bKI0z2CUx8Gc /RS11GPGXdYzk7U9fq3TqbUIEAllXLJI2Ls6fn0c= Date: Fri, 11 Oct 2013 21:14:56 -0400 From: Theodore Ts'o To: "Darrick J. Wong" Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH 28/31] mke2fs: Complain about creating 64bit filesystems without extents Message-ID: <20131012011456.GB22656@thunk.org> References: <20131001012642.28415.89353.stgit@birch.djwong.org> <20131001012946.28415.19973.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20131001012946.28415.19973.stgit@birch.djwong.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 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 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 Signed-off-by: "Theodore Ts'o" --- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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) &&