From patchwork Tue Nov 27 18:35:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 202279 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 AEC342C0094 for ; Wed, 28 Nov 2012 05:36:14 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756647Ab2K0SgM (ORCPT ); Tue, 27 Nov 2012 13:36:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6296 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756357Ab2K0SgM (ORCPT ); Tue, 27 Nov 2012 13:36:12 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qARIZokL031218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Nov 2012 13:35:50 -0500 Received: from liberator.sandeen.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qARIZmJS022040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 Nov 2012 13:35:49 -0500 Message-ID: <50B50804.6020309@redhat.com> Date: Tue, 27 Nov 2012 12:35:48 -0600 From: Eric Sandeen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: ext4 development CC: Bert.Deknuydt@esat.kuleuven.be Subject: [PATCH] tune2fs: respect quota config option References: <50B504C4.6090504@redhat.com> In-Reply-To: <50B504C4.6090504@redhat.com> X-Enigmail-Version: 1.4.6 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org If we haven't turned --enable-quota on at config time, I don't think tune2fs should know about the feature either. Today we can actually tune2fs -O quota even if not configured on, and then the rest of the tools will refuse to touch it: # tune2fs -O quota /dev/sda1 # tune2fs -O ^quota /dev/whatever complains tune2fs 1.42.3 (14-May-2012) tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/sda1 # fsck /dev/sda1 fsck from util-linux 2.21.2 e2fsck 1.42.3 (14-May-2012) /dev/sda1 has unsupported feature(s): quota e2fsck: Get a newer version of e2fsck! Ok, so turn it off? # tune2fs -O ^quota /dev/whatever complains tune2fs 1.42.3 (14-May-2012) tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/sda1 Nope. Debugfs? Nope. # debugfs -w /dev/sda1 debugfs 1.42.3 (14-May-2012) /dev/sda1: Filesystem has unsupported read-only feature(s) while opening filesystem Signed-off-by: Eric Sandeen Reported-by: Bert DeKnuydt Addresses-Red-Hat-Bugzilla: #880596 --- -- 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/tune2fs.c b/misc/tune2fs.c index b290c46..17c1565 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -145,7 +145,9 @@ static __u32 ok_features[3] = { EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| EXT4_FEATURE_RO_COMPAT_GDT_CSUM | EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER | +#ifdef CONFIG_QUOTA EXT4_FEATURE_RO_COMPAT_QUOTA | +#endif EXT4_FEATURE_RO_COMPAT_METADATA_CSUM }; @@ -164,7 +166,9 @@ static __u32 clear_ok_features[3] = { EXT4_FEATURE_RO_COMPAT_DIR_NLINK| EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| EXT4_FEATURE_RO_COMPAT_GDT_CSUM | +#ifdef CONFIG_QUOTA EXT4_FEATURE_RO_COMPAT_QUOTA | +#endif EXT4_FEATURE_RO_COMPAT_METADATA_CSUM };