Patchwork [2/2] quota: autoload the quota_v2 module for QFMT_VFS_V1 quota format

login
register
mail settings
Submitter Theodore Ts'o
Date Jan. 21, 2013, 6:46 a.m.
Message ID <1358750781-5670-2-git-send-email-tytso@mit.edu>
Download mbox | patch
Permalink /patch/214031/
State Accepted
Headers show

Comments

Theodore Ts'o - Jan. 21, 2013, 6:46 a.m.
Otherwise, ext4 file systems with the quota feature enable will get a
very confusing "No such process" error message if the quota code is
built as a mdoule and the quota_v2 module has not been loaded.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>
Cc: stable@vger.kernel.org
---
 include/linux/quota.h | 1 +
 1 file changed, 1 insertion(+)
Jan Kara - Jan. 21, 2013, 10:40 a.m.
On Mon 21-01-13 01:46:21, Ted Tso wrote:
> Otherwise, ext4 file systems with the quota feature enable will get a
> very confusing "No such process" error message if the quota code is
> built as a mdoule and the quota_v2 module has not been loaded.
  Thanks for the fix. Should I merge it via my tree or do you plan to do it
via your tree?

								Honza
> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Jan Kara <jack@suse.cz>
> Cc: stable@vger.kernel.org
> ---
>  include/linux/quota.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/quota.h b/include/linux/quota.h
> index 58fdef12..d133711 100644
> --- a/include/linux/quota.h
> +++ b/include/linux/quota.h
> @@ -405,6 +405,7 @@ struct quota_module_name {
>  #define INIT_QUOTA_MODULE_NAMES {\
>  	{QFMT_VFS_OLD, "quota_v1"},\
>  	{QFMT_VFS_V0, "quota_v2"},\
> +	{QFMT_VFS_V1, "quota_v2"},\
>  	{0, NULL}}
>  
>  #endif /* _QUOTA_ */
> -- 
> 1.7.12.rc0.22.gcdd159b
>
Carlos Maiolino - Jan. 21, 2013, 12:16 p.m.
Looks good,

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
On Mon, Jan 21, 2013 at 01:46:21AM -0500, Theodore Ts'o wrote:
> Otherwise, ext4 file systems with the quota feature enable will get a
> very confusing "No such process" error message if the quota code is
> built as a mdoule and the quota_v2 module has not been loaded.
> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Jan Kara <jack@suse.cz>
> Cc: stable@vger.kernel.org
> ---
>  include/linux/quota.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/quota.h b/include/linux/quota.h
> index 58fdef12..d133711 100644
> --- a/include/linux/quota.h
> +++ b/include/linux/quota.h
> @@ -405,6 +405,7 @@ struct quota_module_name {
>  #define INIT_QUOTA_MODULE_NAMES {\
>  	{QFMT_VFS_OLD, "quota_v1"},\
>  	{QFMT_VFS_V0, "quota_v2"},\
> +	{QFMT_VFS_V1, "quota_v2"},\
>  	{0, NULL}}
>  
>  #endif /* _QUOTA_ */
> -- 
> 1.7.12.rc0.22.gcdd159b
> 
> --
> 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
Theodore Ts'o - Jan. 21, 2013, 3:01 p.m.
On Mon, Jan 21, 2013 at 11:40:17AM +0100, Jan Kara wrote:
> On Mon 21-01-13 01:46:21, Ted Tso wrote:
> > Otherwise, ext4 file systems with the quota feature enable will get a
> > very confusing "No such process" error message if the quota code is
> > built as a mdoule and the quota_v2 module has not been loaded.
>   Thanks for the fix. Should I merge it via my tree or do you plan to do it
> via your tree?

I'm happy to keep the patch in my tree (since I need it for my ext4
quota testing), unless you'd like to take it.  It seems unlikely to
cause any conflicts with any changes you might have in your quota
tree, yes?

						 - Ted
--
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
Jan Kara - Jan. 21, 2013, 3:10 p.m.
On Mon 21-01-13 10:01:34, Ted Tso wrote:
> On Mon, Jan 21, 2013 at 11:40:17AM +0100, Jan Kara wrote:
> > On Mon 21-01-13 01:46:21, Ted Tso wrote:
> > > Otherwise, ext4 file systems with the quota feature enable will get a
> > > very confusing "No such process" error message if the quota code is
> > > built as a mdoule and the quota_v2 module has not been loaded.
> >   Thanks for the fix. Should I merge it via my tree or do you plan to do it
> > via your tree?
> 
> I'm happy to keep the patch in my tree (since I need it for my ext4
> quota testing), unless you'd like to take it.  It seems unlikely to
> cause any conflicts with any changes you might have in your quota
> tree, yes?
  Exactly. There shouldn't be any conflicts so just keep it in your tree.
You can add to the patch:
Acked-by: Jan Kara <jack@suse.cz>

								Honza
Theodore Ts'o - Jan. 21, 2013, 3:50 p.m.
On Mon, Jan 21, 2013 at 04:10:08PM +0100, Jan Kara wrote:
>   Exactly. There shouldn't be any conflicts so just keep it in your tree.
> You can add to the patch:
> Acked-by: Jan Kara <jack@suse.cz>

Great, thanks.

BTW, do you have any plans to work on getting repquota support for
ocfs2 and ext4 with the internal quota support into quotactl(2) and
quotatools?  It's missing functionality that I think users who want to
switch to the internal quota support will very much care about.

The work list that I have currently for ext4 w/ internal quota support
are:

1)  Debugfs support for manipulating the quota inode directly.  (So we
can introduce fs corruptions and make sure e2fsck deals
appropriately).

2)  Make sure e2fsck preserves the quota limits information when it
repairs the quota information, and that it notices a missing quota
record in the quota inode.

3)  Make sure e2fsck notices repairs a quota inode which is corrupted
in some way (and not just contains missing or incorrect usage
information).

4)  More regression tests in e2fsprogs.

5) Add some kind of functional replacement for repquota.  If
quotactl(2) support is not forthcoming in the near future, at the very
least debugfs should have a way of dumping out the repquota
information for an unmounted ext4 file system with internal quotas
enabled.

Can anyone think of other things which might be missing?

					- Ted
--
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
Jan Kara - Jan. 21, 2013, 7:08 p.m.
On Mon 21-01-13 10:50:20, Ted Tso wrote:
> On Mon, Jan 21, 2013 at 04:10:08PM +0100, Jan Kara wrote:
> >   Exactly. There shouldn't be any conflicts so just keep it in your tree.
> > You can add to the patch:
> > Acked-by: Jan Kara <jack@suse.cz>
> 
> Great, thanks.
> 
> BTW, do you have any plans to work on getting repquota support for
> ocfs2 and ext4 with the internal quota support into quotactl(2) and
> quotatools?  It's missing functionality that I think users who want to
> switch to the internal quota support will very much care about.
  As Carlos mentioned, it kind-of works. If repquota(8) doesn't have a way
to iterate over quota structures directly, it iterates over entries in
/etc/passwd and uses Q_GETQUOTA to find the information. It is not a
perfect solution (e.g. when you have a huge LDAP database instead of
/etc/passwd) but in lots of cases it works just fine.

> 5) Add some kind of functional replacement for repquota.  If
> quotactl(2) support is not forthcoming in the near future, at the very
> least debugfs should have a way of dumping out the repquota
> information for an unmounted ext4 file system with internal quotas
> enabled.
  I have it on my todo list for a long time. The problem is noone wants it
enough to get to the top of the list... Also it won't be completely trivial
interface because we'll have to return some handle with which we could
associate scanning state. My plan would be to likely return an ordinary
read-only file handle (mostly to avoid various problems with what happens
when process exits without closing the handle or what happens on fork)
where f_pos would mean [ug]id to report next and reading would fill the
buffer with quota structures (if_dqblk + [ug]id). But I haven't tried
coding this...

								Honza

Patch

diff --git a/include/linux/quota.h b/include/linux/quota.h
index 58fdef12..d133711 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -405,6 +405,7 @@  struct quota_module_name {
 #define INIT_QUOTA_MODULE_NAMES {\
 	{QFMT_VFS_OLD, "quota_v1"},\
 	{QFMT_VFS_V0, "quota_v2"},\
+	{QFMT_VFS_V1, "quota_v2"},\
 	{0, NULL}}
 
 #endif /* _QUOTA_ */