2016-03-16 05:29:11

by Theodore Ts'o

[permalink] [raw]
Subject: Reporting project quota usage?

Am I missing something, or do we currently don't have a way to report
project quota usage with ext4? The support doesn't appear to be in
quota tools, and xfs_quota doesn't work without changes because it
only tries to operate on XFS file systems.

Thanks,

- Ted


2016-03-16 21:49:37

by Andreas Dilger

[permalink] [raw]
Subject: Re: Reporting project quota usage?

On Mar 15, 2016, at 11:29 PM, Theodore Ts'o <[email protected]> wrote:
>
> Am I missing something, or do we currently don't have a way to report
> project quota usage with ext4? The support doesn't appear to be in
> quota tools, and xfs_quota doesn't work without changes because it
> only tries to operate on XFS file systems.

At one time I thought Dave was going to patch xfs_quota to try the quota
ioctls for "foreign" filesystems like ext4 that supported them, but I'm
not sure if that patch was landed, nor whether it has been released.

On the opposite front, Jan was updating the generic quota tools to support
the XFS ioctls that project quota is using?

Cheers, Andreas






Attachments:
signature.asc (833.00 B)
Message signed with OpenPGP using GPGMail

2016-03-17 00:48:52

by Theodore Ts'o

[permalink] [raw]
Subject: Re: Reporting project quota usage?

On Wed, Mar 16, 2016 at 03:49:31PM -0600, Andreas Dilger wrote:
>
> At one time I thought Dave was going to patch xfs_quota to try the quota
> ioctls for "foreign" filesystems like ext4 that supported them, but I'm
> not sure if that patch was landed, nor whether it has been released.
>
> On the opposite front, Jan was updating the generic quota tools to support
> the XFS ioctls that project quota is using?

It's quite possible I'm missing something, but it doesn't look like
either has landed. I've hacked xfs_quota (not anything that I would
want to submit for merging) so I can report usage project quota stats,
and to be able to set hard and soft limits. But I was trying to
figure out what we should be telling users who wanted to use Project
Quota, but I'm pretty sure "pull down xfsprogs sources, and apply this
hacky patch[1], and then when you use the tooll ignore a whole bunch
of spurious warnings" is the right way to go. :-)

I am also curious how Li Xi was testing the patches he sent me.

- Ted

[1]

diff --git a/libxcmd/paths.c b/libxcmd/paths.c
index 5c65737..6c69a35 100644
--- a/libxcmd/paths.c
+++ b/libxcmd/paths.c
@@ -301,8 +301,8 @@ fs_table_initialise_mounts(
return errno;

while ((mnt = getmntent(mtp)) != NULL) {
- if (strcmp(mnt->mnt_type, "xfs") != 0)
- continue;
+// if (strcmp(mnt->mnt_type, "xfs") != 0)
+// continue;
if (!realpath(mnt->mnt_dir, rmnt_dir))
continue;
if (!realpath(mnt->mnt_fsname, rmnt_fsname))

2016-03-17 01:47:45

by Li Xi

[permalink] [raw]
Subject: Re: Reporting project quota usage?

Hi,

I sent a patch of quota tool to Jan Kara ccing you. With that patch,
project quota
of ext4 can be reported. However, that patch needs a lot of improvement.

That patch can be found here too:

https://github.com/ddn-lixi/project_quota_ext4_utils/blob/master/quota-tools.git/patches/project_quota_support_for_quota-tools.patch

Regards,
Li Xi

On Wed, Mar 16, 2016 at 1:29 PM, Theodore Ts'o <[email protected]> wrote:
> Am I missing something, or do we currently don't have a way to report
> project quota usage with ext4? The support doesn't appear to be in
> quota tools, and xfs_quota doesn't work without changes because it
> only tries to operate on XFS file systems.
>
> Thanks,
>
> - Ted

2016-03-17 01:51:35

by Dave Chinner

[permalink] [raw]
Subject: Re: Reporting project quota usage?

On Wed, Mar 16, 2016 at 08:48:47PM -0400, Theodore Ts'o wrote:
> On Wed, Mar 16, 2016 at 03:49:31PM -0600, Andreas Dilger wrote:
> >
> > At one time I thought Dave was going to patch xfs_quota to try the quota
> > ioctls for "foreign" filesystems like ext4 that supported them, but I'm
> > not sure if that patch was landed, nor whether it has been released.
> >
> > On the opposite front, Jan was updating the generic quota tools to support
> > the XFS ioctls that project quota is using?
>
> It's quite possible I'm missing something, but it doesn't look like
> either has landed. I've hacked xfs_quota (not anything that I would
> want to submit for merging)

I posted a patch to do it, but I haven't had a chance to fix the
problems Eric noticed because other stuff happened.

You're welcome to fix it up and repost it:

http://oss.sgi.com/archives/xfs/2016-02/msg00109.html

Cheers,

Dave.
--
Dave Chinner
[email protected]

2016-03-18 09:39:50

by Jan Kara

[permalink] [raw]
Subject: Re: Reporting project quota usage?

On Wed 16-03-16 20:48:47, Ted Tso wrote:
> On Wed, Mar 16, 2016 at 03:49:31PM -0600, Andreas Dilger wrote:
> >
> > At one time I thought Dave was going to patch xfs_quota to try the quota
> > ioctls for "foreign" filesystems like ext4 that supported them, but I'm
> > not sure if that patch was landed, nor whether it has been released.
> >
> > On the opposite front, Jan was updating the generic quota tools to support
> > the XFS ioctls that project quota is using?
>
> It's quite possible I'm missing something, but it doesn't look like
> either has landed. I've hacked xfs_quota (not anything that I would
> want to submit for merging) so I can report usage project quota stats,
> and to be able to set hard and soft limits. But I was trying to
> figure out what we should be telling users who wanted to use Project
> Quota, but I'm pretty sure "pull down xfsprogs sources, and apply this
> hacky patch[1], and then when you use the tooll ignore a whole bunch
> of spurious warnings" is the right way to go. :-)
>
> I am also curious how Li Xi was testing the patches he sent me.

As Li Xi mentioned, he has a patch for quota-tools which implements the
project quota support but it needs some cleanup (you can check my reply to
email "[PATCH] Add project quota support" - it didn't go to any list but
you were CCed). Li Xi, do you have any idea when you can get to it?

Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR

2016-03-22 14:58:21

by Jan Kara

[permalink] [raw]
Subject: Re: Reporting project quota usage?

Hi,

On Thu 17-03-16 09:47:44, Li Xi wrote:
> I sent a patch of quota tool to Jan Kara ccing you. With that patch,
> project quota
> of ext4 can be reported. However, that patch needs a lot of improvement.
>
> That patch can be found here too:
>
> https://github.com/ddn-lixi/project_quota_ext4_utils/blob/master/quota-tools.git/patches/project_quota_support_for_quota-tools.patch

Li Xi, if I find time to massage the patch into usable form, can I add your
Signed-off-by so that I can commit it in quota-tools repository?

Honza

> On Wed, Mar 16, 2016 at 1:29 PM, Theodore Ts'o <[email protected]> wrote:
> > Am I missing something, or do we currently don't have a way to report
> > project quota usage with ext4? The support doesn't appear to be in
> > quota tools, and xfs_quota doesn't work without changes because it
> > only tries to operate on XFS file systems.
> >
> > Thanks,
> >
> > - Ted
--
Jan Kara <[email protected]>
SUSE Labs, CR

2016-03-30 09:25:19

by Jan Kara

[permalink] [raw]
Subject: Re: Reporting project quota usage?

On Tue 22-03-16 15:58:46, Jan Kara wrote:
> Hi,
>
> On Thu 17-03-16 09:47:44, Li Xi wrote:
> > I sent a patch of quota tool to Jan Kara ccing you. With that patch,
> > project quota
> > of ext4 can be reported. However, that patch needs a lot of improvement.
> >
> > That patch can be found here too:
> >
> > https://github.com/ddn-lixi/project_quota_ext4_utils/blob/master/quota-tools.git/patches/project_quota_support_for_quota-tools.patch
>
> Li Xi, if I find time to massage the patch into usable form, can I add your
> Signed-off-by so that I can commit it in quota-tools repository?

Ping? Without your Signed-off-by tag I cannot really add your code into
quota-tools repository...

Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR

2016-03-31 02:55:52

by Li Xi

[permalink] [raw]
Subject: Re: Reporting project quota usage?

Hi Jan Kara,

Sorry for delay.

Please feel free to add "Signed-off-by: Li Xi <[email protected]>".

Regards,
Li Xi

On Wed, Mar 30, 2016 at 5:25 PM, Jan Kara <[email protected]> wrote:
> On Tue 22-03-16 15:58:46, Jan Kara wrote:
>> Hi,
>>
>> On Thu 17-03-16 09:47:44, Li Xi wrote:
>> > I sent a patch of quota tool to Jan Kara ccing you. With that patch,
>> > project quota
>> > of ext4 can be reported. However, that patch needs a lot of improvement.
>> >
>> > That patch can be found here too:
>> >
>> > https://github.com/ddn-lixi/project_quota_ext4_utils/blob/master/quota-tools.git/patches/project_quota_support_for_quota-tools.patch
>>
>> Li Xi, if I find time to massage the patch into usable form, can I add your
>> Signed-off-by so that I can commit it in quota-tools repository?
>
> Ping? Without your Signed-off-by tag I cannot really add your code into
> quota-tools repository...
>
> Honza
> --
> Jan Kara <[email protected]>
> SUSE Labs, CR

2016-03-31 08:47:10

by Jan Kara

[permalink] [raw]
Subject: Re: Reporting project quota usage?

Hi!

On Thu 31-03-16 10:55:51, Li Xi wrote:
> Sorry for delay.
>
> Please feel free to add "Signed-off-by: Li Xi <[email protected]>".

Thanks. I have pushed out patches with project quota support to quota-tools
reporsitories.

Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR