linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Cc: Bert.Deknuydt@esat.kuleuven.be
Subject: [PATCH] tune2fs: respect quota config option
Date: Tue, 27 Nov 2012 12:35:48 -0600	[thread overview]
Message-ID: <50B50804.6020309@redhat.com> (raw)
In-Reply-To: <50B504C4.6090504@redhat.com>

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 <sandeen@redhat.com>
Reported-by: Bert DeKnuydt <Bert.Deknuydt@esat.kuleuven.be>
Addresses-Red-Hat-Bugzilla: #880596
---

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
 };
 



  reply	other threads:[~2012-11-27 18:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 18:21 [PATCH] e2fsprogs: fix configure help text for quota Eric Sandeen
2012-11-27 18:35 ` Eric Sandeen [this message]
2012-11-29  4:03   ` [PATCH] tune2fs: respect quota config option Theodore Ts'o
2012-11-29  5:47   ` [PATCH] mke2fs: remove quota docs if not configured in Eric Sandeen
2013-08-02 15:48     ` Eric Sandeen
2013-09-23 19:09       ` Eric Sandeen
2013-10-14 13:01     ` Theodore Ts'o
2012-11-29  4:03 ` [PATCH] e2fsprogs: fix configure help text for quota Theodore Ts'o
2012-11-29  5:50   ` Eric Sandeen
2012-11-29 13:55     ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50B50804.6020309@redhat.com \
    --to=sandeen@redhat.com \
    --cc=Bert.Deknuydt@esat.kuleuven.be \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).