2012-11-27 18:21:57

by Eric Sandeen

[permalink] [raw]
Subject: [PATCH] e2fsprogs: fix configure help text for quota

It's --enable-quota, not --enable-libquota.

Signed-off-by: Eric Sandeen <[email protected]>
---

PS it's still off by default. Should it be? What bugs remain?

Manpage refers to "-O quota" unconditionally. Maybe that should be
different depending on how it's configured?




diff --git a/configure b/configure
index d47cef7..91e2bf5 100755
--- a/configure
+++ b/configure
@@ -1498,7 +1498,7 @@ Optional Features:
--disable-testio-debug disable the use of the test I/O manager for debugging
--disable-libuuid do not build private uuid library
--disable-libblkid do not build private blkid library
- --enable-libquota enable quota support
+ --enable-quota enable quota support
--disable-debugfs disable support of debugfs program
--disable-imager disable support of e2image program
--disable-resizer disable support of e2resize program
diff --git a/configure.in b/configure.in
index 0b96b8d..bc8d1e8 100644
--- a/configure.in
+++ b/configure.in
@@ -568,7 +568,7 @@ dnl
PKG_PROG_PKG_CONFIG
AH_TEMPLATE([CONFIG_QUOTA], [Define to 1 to enable quota support])
AC_ARG_ENABLE([quota],
-[ --enable-libquota enable quota support],
+[ --enable-quota enable quota support],
if test "$enableval" = "no"
then
AC_MSG_RESULT([Disabling quota support])



2012-11-27 18:36:12

by Eric Sandeen

[permalink] [raw]
Subject: [PATCH] tune2fs: respect quota config option

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 <[email protected]>
Reported-by: Bert DeKnuydt <[email protected]>
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
};




2012-11-29 04:03:28

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] e2fsprogs: fix configure help text for quota

On Tue, Nov 27, 2012 at 12:21:56PM -0600, Eric Sandeen wrote:
> It's --enable-quota, not --enable-libquota.
>
> Signed-off-by: Eric Sandeen <[email protected]>

Thanks, applied.

> PS it's still off by default. Should it be? What bugs remain?

Yeah, we probably should turn it on. It's turned on by default in
Debian in the 1.42.x releases. I don't know of any remaining bugs,
but at the same time, it's not gotten a lot of use to date.

- Ted

2012-11-29 04:03:45

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] tune2fs: respect quota config option

On Tue, Nov 27, 2012 at 12:35:48PM -0600, Eric Sandeen wrote:
> If we haven't turned --enable-quota on at config time,
> I don't think tune2fs should know about the feature either.

Agreed. Thanks, applied.

- Ted

2012-11-29 05:48:00

by Eric Sandeen

[permalink] [raw]
Subject: [PATCH] mke2fs: remove quota docs if not configured in

If quota isn't turned on with --enable-quota, then comment
quota documentation out of the mke2fs manpage.

Signed-off-by: Eric Sandeen <[email protected]>
---

first time I've mucked with subst, dunno if this is right
but it seems to work :)

diff --git a/configure.in b/configure.in
index bc8d1e8..2d431bd 100644
--- a/configure.in
+++ b/configure.in
@@ -565,6 +565,8 @@ AC_SUBST(BLKID_CMT)
dnl
dnl handle --enable-quota
dnl
+QUOTA_MAN_COMMENT='.\"'
+AC_SUBST(QUOTA_MAN_COMMENT)
PKG_PROG_PKG_CONFIG
AH_TEMPLATE([CONFIG_QUOTA], [Define to 1 to enable quota support])
AC_ARG_ENABLE([quota],
@@ -575,6 +577,8 @@ then
else
AC_DEFINE(CONFIG_QUOTA, 1)
AC_MSG_RESULT([Enabling quota support])
+ QUOTA_MAN_COMMENT=""
+ AC_SUBST(QUOTA_MAN_COMMENT)
fi
,
AC_MSG_RESULT([Disabling quota support by default])
diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in
index d4fbe00..92cae74 100644
--- a/misc/mke2fs.8.in
+++ b/misc/mke2fs.8.in
@@ -275,13 +275,13 @@ as default.
.TP
.BI nodiscard
Do not attempt to discard blocks at mkfs time.
-.TP
-.BI quotatype
-Specify which quota type ('usr' or 'grp') is to be initialized. This
-option has any effect only if
-.B quota
-feature is set. Without this extended option, the default behavior is to
-initialize both user and group quotas.
+@[email protected]
+@[email protected] quotatype
+@QUOTA_MAN_COMMENT@Specify which quota type ('usr' or 'grp') is to be initialized. This
+@QUOTA_MAN_COMMENT@option has any effect only if
+@[email protected] quota
+@QUOTA_MAN_COMMENT@feature is set. Without this extended option, the default behavior is to
+@QUOTA_MAN_COMMENT@initialize both user and group quotas.
.RE
.TP
.BI \-f " fragment-size"
@@ -555,11 +555,11 @@ option).
.B large_file
Filesystem can contain files that are greater than 2GB. (Modern kernels
set this feature automatically when a file > 2GB is created.)
-.TP
-.B quota
-Create quota inodes (inode# 3 for userquota and inode# 4 for group quota) and
-set them in the superblock. With this feature, the quotas will be enabled
-automatically when the filesystem is mounted.
+@[email protected]
+@[email protected] quota
+@QUOTA_MAN_COMMENT@Create quota inodes (inode# 3 for userquota and inode# 4 for group quota) and
+@QUOTA_MAN_COMMENT@set them in the superblock. With this feature, the quotas will be enabled
+@QUOTA_MAN_COMMENT@automatically when the filesystem is mounted.
.TP
.B resize_inode
Reserve space so the block group descriptor table may grow in the future.
diff --git a/util/subst.conf.in b/util/subst.conf.in
index 0e074d8..64fde7a 100644
--- a/util/subst.conf.in
+++ b/util/subst.conf.in
@@ -18,3 +18,5 @@ $prefix @prefix@
# Enable the documentation for the journal device mke2fs, tune2fs, and
# e2fsck's man page
JDEV
+# Enable documentation for quota feature in mke2fs
+QUOTA_MAN_COMMENT @QUOTA_MAN_COMMENT@


2012-11-29 05:50:49

by Eric Sandeen

[permalink] [raw]
Subject: Re: [PATCH] e2fsprogs: fix configure help text for quota

On 11/28/12 10:03 PM, Theodore Ts'o wrote:
> On Tue, Nov 27, 2012 at 12:21:56PM -0600, Eric Sandeen wrote:
>> It's --enable-quota, not --enable-libquota.
>>
>> Signed-off-by: Eric Sandeen <[email protected]>
>
> Thanks, applied.
>
>> PS it's still off by default. Should it be? What bugs remain?
>
> Yeah, we probably should turn it on. It's turned on by default in
> Debian in the 1.42.x releases. I don't know of any remaining bugs,
> but at the same time, it's not gotten a lot of use to date.
>
> - Ted

Hum, ok.

Maybe then rather than fixing up all the configure stuff, I
should have just removed the switch and turned it on. Oh well.

-Eric


2012-11-29 13:55:30

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] e2fsprogs: fix configure help text for quota

On Wed, Nov 28, 2012 at 11:50:46PM -0600, Eric Sandeen wrote:
>
> Maybe then rather than fixing up all the configure stuff, I
> should have just removed the switch and turned it on. Oh well.

I applied the fix to the maint branch (1.42.x). Yeah, we should
probably remove the switch from the master/next branches. Also on my
todo list is to rename libquota to something like libinternal, and
then move things like e2fsck/profile.c to libinternal (since we
currently share that code in mke2fs via a pretty ugly ad hoc
mechanisms, and having a static libinternal library would be a cleaner
way of handling things).

- Ted

2013-08-02 15:49:42

by Eric Sandeen

[permalink] [raw]
Subject: Re: [PATCH] mke2fs: remove quota docs if not configured in

On 11/28/12 11:47 PM, Eric Sandeen wrote:
> If quota isn't turned on with --enable-quota, then comment
> quota documentation out of the mke2fs manpage.
>
> Signed-off-by: Eric Sandeen <[email protected]>
> ---
>
> first time I've mucked with subst, dunno if this is right
> but it seems to work :)

Going through old patches - ping on this one?

-Eric

> diff --git a/configure.in b/configure.in
> index bc8d1e8..2d431bd 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -565,6 +565,8 @@ AC_SUBST(BLKID_CMT)
> dnl
> dnl handle --enable-quota
> dnl
> +QUOTA_MAN_COMMENT='.\"'
> +AC_SUBST(QUOTA_MAN_COMMENT)
> PKG_PROG_PKG_CONFIG
> AH_TEMPLATE([CONFIG_QUOTA], [Define to 1 to enable quota support])
> AC_ARG_ENABLE([quota],
> @@ -575,6 +577,8 @@ then
> else
> AC_DEFINE(CONFIG_QUOTA, 1)
> AC_MSG_RESULT([Enabling quota support])
> + QUOTA_MAN_COMMENT=""
> + AC_SUBST(QUOTA_MAN_COMMENT)
> fi
> ,
> AC_MSG_RESULT([Disabling quota support by default])
> diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in
> index d4fbe00..92cae74 100644
> --- a/misc/mke2fs.8.in
> +++ b/misc/mke2fs.8.in
> @@ -275,13 +275,13 @@ as default.
> .TP
> .BI nodiscard
> Do not attempt to discard blocks at mkfs time.
> -.TP
> -.BI quotatype
> -Specify which quota type ('usr' or 'grp') is to be initialized. This
> -option has any effect only if
> -.B quota
> -feature is set. Without this extended option, the default behavior is to
> -initialize both user and group quotas.
> +@[email protected]
> +@[email protected] quotatype
> +@QUOTA_MAN_COMMENT@Specify which quota type ('usr' or 'grp') is to be initialized. This
> +@QUOTA_MAN_COMMENT@option has any effect only if
> +@[email protected] quota
> +@QUOTA_MAN_COMMENT@feature is set. Without this extended option, the default behavior is to
> +@QUOTA_MAN_COMMENT@initialize both user and group quotas.
> .RE
> .TP
> .BI \-f " fragment-size"
> @@ -555,11 +555,11 @@ option).
> .B large_file
> Filesystem can contain files that are greater than 2GB. (Modern kernels
> set this feature automatically when a file > 2GB is created.)
> -.TP
> -.B quota
> -Create quota inodes (inode# 3 for userquota and inode# 4 for group quota) and
> -set them in the superblock. With this feature, the quotas will be enabled
> -automatically when the filesystem is mounted.
> +@[email protected]
> +@[email protected] quota
> +@QUOTA_MAN_COMMENT@Create quota inodes (inode# 3 for userquota and inode# 4 for group quota) and
> +@QUOTA_MAN_COMMENT@set them in the superblock. With this feature, the quotas will be enabled
> +@QUOTA_MAN_COMMENT@automatically when the filesystem is mounted.
> .TP
> .B resize_inode
> Reserve space so the block group descriptor table may grow in the future.
> diff --git a/util/subst.conf.in b/util/subst.conf.in
> index 0e074d8..64fde7a 100644
> --- a/util/subst.conf.in
> +++ b/util/subst.conf.in
> @@ -18,3 +18,5 @@ $prefix @prefix@
> # Enable the documentation for the journal device mke2fs, tune2fs, and
> # e2fsck's man page
> JDEV
> +# Enable documentation for quota feature in mke2fs
> +QUOTA_MAN_COMMENT @QUOTA_MAN_COMMENT@
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>


2013-09-23 19:10:54

by Eric Sandeen

[permalink] [raw]
Subject: Re: [PATCH] mke2fs: remove quota docs if not configured in

On 8/2/13 10:48 AM, Eric Sandeen wrote:
> On 11/28/12 11:47 PM, Eric Sandeen wrote:
>> If quota isn't turned on with --enable-quota, then comment
>> quota documentation out of the mke2fs manpage.
>>
>> Signed-off-by: Eric Sandeen <[email protected]>
>> ---
>>
>> first time I've mucked with subst, dunno if this is right
>> but it seems to work :)
>
> Going through old patches - ping on this one?

And again. Ping?

-Eric

> -Eric
>
>> diff --git a/configure.in b/configure.in
>> index bc8d1e8..2d431bd 100644
>> --- a/configure.in
>> +++ b/configure.in
>> @@ -565,6 +565,8 @@ AC_SUBST(BLKID_CMT)
>> dnl
>> dnl handle --enable-quota
>> dnl
>> +QUOTA_MAN_COMMENT='.\"'
>> +AC_SUBST(QUOTA_MAN_COMMENT)
>> PKG_PROG_PKG_CONFIG
>> AH_TEMPLATE([CONFIG_QUOTA], [Define to 1 to enable quota support])
>> AC_ARG_ENABLE([quota],
>> @@ -575,6 +577,8 @@ then
>> else
>> AC_DEFINE(CONFIG_QUOTA, 1)
>> AC_MSG_RESULT([Enabling quota support])
>> + QUOTA_MAN_COMMENT=""
>> + AC_SUBST(QUOTA_MAN_COMMENT)
>> fi
>> ,
>> AC_MSG_RESULT([Disabling quota support by default])
>> diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in
>> index d4fbe00..92cae74 100644
>> --- a/misc/mke2fs.8.in
>> +++ b/misc/mke2fs.8.in
>> @@ -275,13 +275,13 @@ as default.
>> .TP
>> .BI nodiscard
>> Do not attempt to discard blocks at mkfs time.
>> -.TP
>> -.BI quotatype
>> -Specify which quota type ('usr' or 'grp') is to be initialized. This
>> -option has any effect only if
>> -.B quota
>> -feature is set. Without this extended option, the default behavior is to
>> -initialize both user and group quotas.
>> +@[email protected]
>> +@[email protected] quotatype
>> +@QUOTA_MAN_COMMENT@Specify which quota type ('usr' or 'grp') is to be initialized. This
>> +@QUOTA_MAN_COMMENT@option has any effect only if
>> +@[email protected] quota
>> +@QUOTA_MAN_COMMENT@feature is set. Without this extended option, the default behavior is to
>> +@QUOTA_MAN_COMMENT@initialize both user and group quotas.
>> .RE
>> .TP
>> .BI \-f " fragment-size"
>> @@ -555,11 +555,11 @@ option).
>> .B large_file
>> Filesystem can contain files that are greater than 2GB. (Modern kernels
>> set this feature automatically when a file > 2GB is created.)
>> -.TP
>> -.B quota
>> -Create quota inodes (inode# 3 for userquota and inode# 4 for group quota) and
>> -set them in the superblock. With this feature, the quotas will be enabled
>> -automatically when the filesystem is mounted.
>> +@[email protected]
>> +@[email protected] quota
>> +@QUOTA_MAN_COMMENT@Create quota inodes (inode# 3 for userquota and inode# 4 for group quota) and
>> +@QUOTA_MAN_COMMENT@set them in the superblock. With this feature, the quotas will be enabled
>> +@QUOTA_MAN_COMMENT@automatically when the filesystem is mounted.
>> .TP
>> .B resize_inode
>> Reserve space so the block group descriptor table may grow in the future.
>> diff --git a/util/subst.conf.in b/util/subst.conf.in
>> index 0e074d8..64fde7a 100644
>> --- a/util/subst.conf.in
>> +++ b/util/subst.conf.in
>> @@ -18,3 +18,5 @@ $prefix @prefix@
>> # Enable the documentation for the journal device mke2fs, tune2fs, and
>> # e2fsck's man page
>> JDEV
>> +# Enable documentation for quota feature in mke2fs
>> +QUOTA_MAN_COMMENT @QUOTA_MAN_COMMENT@
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>


2013-10-14 13:01:47

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] mke2fs: remove quota docs if not configured in

On Wed, Nov 28, 2012 at 11:47:51PM -0600, Eric Sandeen wrote:
> If quota isn't turned on with --enable-quota, then comment
> quota documentation out of the mke2fs manpage.
>
> Signed-off-by: Eric Sandeen <[email protected]>

Applied, thanks.

- Ted