From patchwork Tue Oct 1 01:29:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darrick Wong X-Patchwork-Id: 279307 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 D8F872C0097 for ; Tue, 1 Oct 2013 11:29:51 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755628Ab3JAB3v (ORCPT ); Mon, 30 Sep 2013 21:29:51 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:38295 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755613Ab3JAB3v (ORCPT ); Mon, 30 Sep 2013 21:29:51 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r911TmUr024219 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Oct 2013 01:29:48 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r911TlnH011007 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Oct 2013 01:29:48 GMT Received: from abhmt115.oracle.com (abhmt115.oracle.com [141.146.116.67]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r911Tlhg009278; Tue, 1 Oct 2013 01:29:47 GMT Received: from localhost (/10.137.226.112) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 30 Sep 2013 18:29:47 -0700 Subject: [PATCH 28/31] mke2fs: Complain about creating 64bit filesystems without extents To: tytso@mit.edu, darrick.wong@oracle.com From: "Darrick J. Wong" Cc: linux-ext4@vger.kernel.org Date: Mon, 30 Sep 2013 18:29:46 -0700 Message-ID: <20131001012946.28415.19973.stgit@birch.djwong.org> In-Reply-To: <20131001012642.28415.89353.stgit@birch.djwong.org> References: <20131001012642.28415.89353.stgit@birch.djwong.org> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 --- misc/mke2fs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 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 d8bd5ed..1e44a84 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -2460,6 +2460,18 @@ int main (int argc, char *argv[]) "checksumming. Pass -O 64bit to rectify.\n")); } + /* Check the user's mkfs options for 64bit */ + if (!quiet && + EXT2_HAS_INCOMPAT_FEATURE(fs->super, + EXT4_FEATURE_INCOMPAT_64BIT) && + !EXT2_HAS_INCOMPAT_FEATURE(fs->super, + EXT3_FEATURE_INCOMPAT_EXTENTS)) { + printf(_("Extents MUST be enabled for a 64-bit filesystem to " + "be able to access the entire disk space. Pass " + "-O extents to rectify.\n")); + exit(1); + } + /* Calculate journal blocks */ if (!journal_device && ((journal_size) || (fs_param.s_feature_compat &