From patchwork Fri Nov 7 21:52:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darrick Wong X-Patchwork-Id: 408274 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 E7E261400A8 for ; Sat, 8 Nov 2014 08:52:34 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752972AbaKGVwb (ORCPT ); Fri, 7 Nov 2014 16:52:31 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:35764 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753147AbaKGVw2 (ORCPT ); Fri, 7 Nov 2014 16:52:28 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sA7LqQVu017999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Nov 2014 21:52:27 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sA7LqQGJ024845 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 7 Nov 2014 21:52:26 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sA7LqQXc025997; Fri, 7 Nov 2014 21:52:26 GMT Received: from localhost (/71.198.20.188) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 07 Nov 2014 13:52:25 -0800 Subject: [PATCH 15/47] misc: don't allow mk_hugefiles unless the fs supports extents From: "Darrick J. Wong" To: tytso@mit.edu, darrick.wong@oracle.com Cc: linux-ext4@vger.kernel.org Date: Fri, 07 Nov 2014 13:52:24 -0800 Message-ID: <20141107215224.883.32873.stgit@birch.djwong.org> In-Reply-To: <20141107215042.883.49888.stgit@birch.djwong.org> References: <20141107215042.883.49888.stgit@birch.djwong.org> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org The current mk_hugefile code in mke2fs doesn't support creating non-extent files, so disable the functionality when we're mkfs'ing without extent support. The fallocate patches further on will eliminate the need for this. Signed-off-by: Darrick J. Wong --- misc/mk_hugefiles.c | 4 ++++ 1 file changed, 4 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/mk_hugefiles.c b/misc/mk_hugefiles.c index 3e4274c..9097b7c 100644 --- a/misc/mk_hugefiles.c +++ b/misc/mk_hugefiles.c @@ -477,6 +477,10 @@ errcode_t mk_hugefiles(ext2_filsys fs, const char *device_name) if (!get_bool_from_profile(fs_types, "make_hugefiles", 0)) return 0; + if (!EXT2_HAS_INCOMPAT_FEATURE(fs->super, + EXT3_FEATURE_INCOMPAT_EXTENTS)) + return EXT2_ET_EXTENT_NOT_SUPPORTED; + uid = get_int_from_profile(fs_types, "hugefiles_uid", 0); gid = get_int_from_profile(fs_types, "hugefiles_gid", 0); fs->umask = get_int_from_profile(fs_types, "hugefiles_umask", 077);