* [PATCH] ext4: report error message when setting usrjquota or grpjquota options failed
@ 2020-10-29 15:46 xiakaixu1987
2020-11-07 3:52 ` Theodore Y. Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: xiakaixu1987 @ 2020-10-29 15:46 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso, adilger.kernel, Kaixu Xia
From: Kaixu Xia <kaixuxia@tencent.com>
The macro MOPT_Q is used to indicates the mount option is quota stuff and
would be the same as MOPT_NOSUPPORT when CONFIG_QUOTA is disabled. We want
to report NOSUPPORT error message when setting usrjquota or grpjquota
options with the CONFIG_QUOTA is disabled, but now it report nothing. So
fix it by adding the MOPT_STRING flag.
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
fs/ext4/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 83fdde498414..a26ba4cf5626 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2025,8 +2025,8 @@ static const struct mount_opts {
{Opt_noquota, (EXT4_MOUNT_QUOTA | EXT4_MOUNT_USRQUOTA |
EXT4_MOUNT_GRPQUOTA | EXT4_MOUNT_PRJQUOTA),
MOPT_CLEAR | MOPT_Q},
- {Opt_usrjquota, 0, MOPT_Q},
- {Opt_grpjquota, 0, MOPT_Q},
+ {Opt_usrjquota, 0, MOPT_Q | MOPT_STRING},
+ {Opt_grpjquota, 0, MOPT_Q | MOPT_STRING},
{Opt_offusrjquota, 0, MOPT_Q},
{Opt_offgrpjquota, 0, MOPT_Q},
{Opt_jqfmt_vfsold, QFMT_VFS_OLD, MOPT_QFMT},
--
2.20.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: report error message when setting usrjquota or grpjquota options failed
2020-10-29 15:46 [PATCH] ext4: report error message when setting usrjquota or grpjquota options failed xiakaixu1987
@ 2020-11-07 3:52 ` Theodore Y. Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Y. Ts'o @ 2020-11-07 3:52 UTC (permalink / raw)
To: xiakaixu1987; +Cc: linux-ext4, adilger.kernel, Kaixu Xia
On Thu, Oct 29, 2020 at 11:46:36PM +0800, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
>
> The macro MOPT_Q is used to indicates the mount option is quota stuff and
> would be the same as MOPT_NOSUPPORT when CONFIG_QUOTA is disabled. We want
> to report NOSUPPORT error message when setting usrjquota or grpjquota
> options with the CONFIG_QUOTA is disabled, but now it report nothing. So
> fix it by adding the MOPT_STRING flag.
>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Thanks, applied with an improved commit description:
The macro MOPT_Q is used to indicates the mount option is related
to quota stuff and is defined to be MOPT_NOSUPPORT when
CONFIG_QUOTA is disabled. Normally the quota options are handled
explicitly, so it didn't matter that the MOPT_STRING flag was
missing, even though the usrjquota and grpjquota mount options
take a string argument. It's important that's present in the
!CONFIG_QUOTA case, since without MOPT_STRING, the mount option
matcher will match usrjquota= followed by an integer, and will
otherwise skip the table entry, and so "mount option not
supported" error message is never reported.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-07 3:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 15:46 [PATCH] ext4: report error message when setting usrjquota or grpjquota options failed xiakaixu1987
2020-11-07 3:52 ` Theodore Y. Ts'o
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).