Re: [Ocfs2-devel] [PATCH 1/3] quota: Add support for ->get_nextdqblk() for VFS quota

2016-02-22 Thread Jan Kara
On Fri 19-02-16 12:43:13, Eric Sandeen wrote:
> 
> 
> On 2/19/16 12:33 PM, Jan Kara wrote:
> > On Fri 19-02-16 11:31:58, Eric Sandeen wrote:
> >>
> >>
> >> On 2/4/16 8:28 AM, Jan Kara wrote:
> >>> Add infrastructure for supporting get_nextdqblk() callback for VFS
> >>> quotas. Translate the operation into a callback to appropriate
> >>> filesystem and consequently to quota format callback.
> >>>
> >>> Signed-off-by: Jan Kara 
> >>> ---
> >>>  fs/ext4/super.c  |  1 +
> >>>  fs/quota/dquot.c | 39 +++
> >>>  fs/reiserfs/super.c  |  1 +
> >>>  include/linux/quota.h|  3 +++
> >>>  include/linux/quotaops.h |  3 +++
> >>>  5 files changed, 47 insertions(+)
> >>>
> >>> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> >>> index f1b56ff01208..51649f442bf6 100644
> >>> --- a/fs/ext4/super.c
> >>> +++ b/fs/ext4/super.c
> >>> @@ -1100,6 +1100,7 @@ static const struct dquot_operations 
> >>> ext4_quota_operations = {
> >>>   .write_info = ext4_write_info,
> >>>   .alloc_dquot= dquot_alloc,
> >>>   .destroy_dquot  = dquot_destroy,
> >>> + .get_next_id= dquot_get_next_id,
> >>>  };
> >>
> >> Hi Jan, doesn't this also need to set:
> >>
> >>
> >> +   .get_nextdqblk  = dquot_get_next_dqblk,
> >>
> >> in ext4_qctl_sysfile_operations?
> > 
> > Indeed, thanks for catching this. Patch added (with your authorship and
> > sign-off) into my tree and this time I've properly tested Q_GETNEXTQUOTA
> > for ext4 with quota in hidden inodes indeed works (previously I've tested
> > only visible quota files).
> 
> Thanks Jan, I wasn't quite sure what it should be doing, but this seemed
> right.  ;)  Sorry for not sending a proper patch.
> 
> So, when you tested visible quota files, I assume it was just falling
> back to the non-next variants of the quotactl, right?  We should not
> be hooking up the call for the visible quota files, right?

We are hooking up the call for visible quota files since it works without
issues. It is upto userspace to decide whether it wants to read the quota
file directly or use Q_GETNEXTQUOTA call to iterate over all dquots.

> FWIW, there is a test in [x]fstests now for the [X]GETNEXT calls, it's
> generic/244

Great, thanks!

Honza

-- 
Jan Kara 
SUSE Labs, CR

___
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel


Re: [Ocfs2-devel] [PATCH 1/3] quota: Add support for ->get_nextdqblk() for VFS quota

2016-02-19 Thread Eric Sandeen


On 2/19/16 12:33 PM, Jan Kara wrote:
> On Fri 19-02-16 11:31:58, Eric Sandeen wrote:
>>
>>
>> On 2/4/16 8:28 AM, Jan Kara wrote:
>>> Add infrastructure for supporting get_nextdqblk() callback for VFS
>>> quotas. Translate the operation into a callback to appropriate
>>> filesystem and consequently to quota format callback.
>>>
>>> Signed-off-by: Jan Kara 
>>> ---
>>>  fs/ext4/super.c  |  1 +
>>>  fs/quota/dquot.c | 39 +++
>>>  fs/reiserfs/super.c  |  1 +
>>>  include/linux/quota.h|  3 +++
>>>  include/linux/quotaops.h |  3 +++
>>>  5 files changed, 47 insertions(+)
>>>
>>> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
>>> index f1b56ff01208..51649f442bf6 100644
>>> --- a/fs/ext4/super.c
>>> +++ b/fs/ext4/super.c
>>> @@ -1100,6 +1100,7 @@ static const struct dquot_operations 
>>> ext4_quota_operations = {
>>> .write_info = ext4_write_info,
>>> .alloc_dquot= dquot_alloc,
>>> .destroy_dquot  = dquot_destroy,
>>> +   .get_next_id= dquot_get_next_id,
>>>  };
>>
>> Hi Jan, doesn't this also need to set:
>>
>>
>> +   .get_nextdqblk  = dquot_get_next_dqblk,
>>
>> in ext4_qctl_sysfile_operations?
> 
> Indeed, thanks for catching this. Patch added (with your authorship and
> sign-off) into my tree and this time I've properly tested Q_GETNEXTQUOTA
> for ext4 with quota in hidden inodes indeed works (previously I've tested
> only visible quota files).

Thanks Jan, I wasn't quite sure what it should be doing, but this seemed
right.  ;)  Sorry for not sending a proper patch.

So, when you tested visible quota files, I assume it was just falling
back to the non-next variants of the quotactl, right?  We should not
be hooking up the call for the visible quota files, right?

FWIW, there is a test in [x]fstests now for the [X]GETNEXT calls, it's
generic/244

Thanks!
-Eric

>   Honza
> 

___
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel


Re: [Ocfs2-devel] [PATCH 1/3] quota: Add support for ->get_nextdqblk() for VFS quota

2016-02-19 Thread Jan Kara
On Fri 19-02-16 11:31:58, Eric Sandeen wrote:
> 
> 
> On 2/4/16 8:28 AM, Jan Kara wrote:
> > Add infrastructure for supporting get_nextdqblk() callback for VFS
> > quotas. Translate the operation into a callback to appropriate
> > filesystem and consequently to quota format callback.
> > 
> > Signed-off-by: Jan Kara 
> > ---
> >  fs/ext4/super.c  |  1 +
> >  fs/quota/dquot.c | 39 +++
> >  fs/reiserfs/super.c  |  1 +
> >  include/linux/quota.h|  3 +++
> >  include/linux/quotaops.h |  3 +++
> >  5 files changed, 47 insertions(+)
> > 
> > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> > index f1b56ff01208..51649f442bf6 100644
> > --- a/fs/ext4/super.c
> > +++ b/fs/ext4/super.c
> > @@ -1100,6 +1100,7 @@ static const struct dquot_operations 
> > ext4_quota_operations = {
> > .write_info = ext4_write_info,
> > .alloc_dquot= dquot_alloc,
> > .destroy_dquot  = dquot_destroy,
> > +   .get_next_id= dquot_get_next_id,
> >  };
> 
> Hi Jan, doesn't this also need to set:
> 
> 
> +   .get_nextdqblk  = dquot_get_next_dqblk,
> 
> in ext4_qctl_sysfile_operations?

Indeed, thanks for catching this. Patch added (with your authorship and
sign-off) into my tree and this time I've properly tested Q_GETNEXTQUOTA
for ext4 with quota in hidden inodes indeed works (previously I've tested
only visible quota files).

Honza
-- 
Jan Kara 
SUSE Labs, CR

___
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel


Re: [Ocfs2-devel] [PATCH 1/3] quota: Add support for ->get_nextdqblk() for VFS quota

2016-02-08 Thread Jan Kara
On Mon 08-02-16 15:27:49, Jan Kara wrote:
> On Fri 05-02-16 12:05:19, Dave Chinner wrote:
> > On Thu, Feb 04, 2016 at 03:28:05PM +0100, Jan Kara wrote:
> > > Add infrastructure for supporting get_nextdqblk() callback for VFS
> > > quotas. Translate the operation into a callback to appropriate
> > > filesystem and consequently to quota format callback.
> > > 
> > > Signed-off-by: Jan Kara 
> > 
> > I'm a little confused here. What patchset is this dependent on? i.e.
> > what introduces the ->get_nextdqblk method?
> 
> It depends on the patches Eric sent which introduce ->get_nextdqblk.
> 
> > The patches I currently have in my XFS working tree introduce this
> > (quota: add new quotactl Q_XGETNEXTQUOTA) and everythign else is
> > dependent on this. I looked a coupl eof days ago and I wasnt' able
> > to find this in your tree.
> 
> Yeah, I have this patch as well, I just didn't push out.
> 
> > I'd much prefer that one of us publish a stable branch with just the
> > quotactl() infrastructure (i.e. commands and bits up to the
> > ->get_nextdqblk() callback) that we can then both base the different
> > subsystem implementations off, rather than one of us having to pull
> > in a whole tree of changes just to get the one commit we need...
> 
> Sure, I have pushed out:
> 
> 'getnextquota' branch into my tree
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git 
> 
> which contains the patches from Eric I carry (including fixups in comments
> other minor stuff I have found during final review). Can you please base
> XFS patches on top of this branch? Thanks!

Ah, now I saw your next email and you already created the stable branch.
OK, since I didn't push out anything yet, I will base my branches on top of
yours. I have made some small fixups in the comments but I can push these
as a separate patch.

Honza
-- 
Jan Kara 
SUSE Labs, CR

___
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel


Re: [Ocfs2-devel] [PATCH 1/3] quota: Add support for ->get_nextdqblk() for VFS quota

2016-02-07 Thread Dave Chinner
On Fri, Feb 05, 2016 at 12:05:19PM +1100, Dave Chinner wrote:
> On Thu, Feb 04, 2016 at 03:28:05PM +0100, Jan Kara wrote:
> > Add infrastructure for supporting get_nextdqblk() callback for VFS
> > quotas. Translate the operation into a callback to appropriate
> > filesystem and consequently to quota format callback.
> > 
> > Signed-off-by: Jan Kara 
> 
> I'm a little confused here. What patchset is this dependent on? i.e.
> what introduces the ->get_nextdqblk method?
> 
> The patches I currently have in my XFS working tree introduce this
> (quota: add new quotactl Q_XGETNEXTQUOTA) and everythign else is
> dependent on this. I looked a coupl eof days ago and I wasnt' able
> to find this in your tree.
> 
> I'd much prefer that one of us publish a stable branch with just the
> quotactl() infrastructure (i.e. commands and bits up to the
> ->get_nextdqblk() callback) that we can then both base the different
> subsystem implementations off, rather than one of us having to pull
> in a whole tree of changes just to get the one commit we need...

Jan, I've posted a stable branch with the quotactl() changes and
the XFS implementation here:

git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git 
xfs-get-next-dquot-4.6

It's currently in the xfs for-next branch for wider testing - I've
done this because I want to get all the pending XFS code out into
for-next land early in this cycle so I can move on and concentrate
on rmap/reflink for the rest of the cycle.

If you want to do this through your tree instead of the XFS tree
then let me know when you publish a branch with quotactl changes in
it so I can rebuild the XFS for-next branch to use that.
Alternatively, i can pull the rest of the generic changes in this
patch set into the branch I already have, so it's all in one place
for ease of testing

Cheeers,

Dave.
-- 
Dave Chinner
da...@fromorbit.com

___
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel


Re: [Ocfs2-devel] [PATCH 1/3] quota: Add support for ->get_nextdqblk() for VFS quota

2016-02-04 Thread Dave Chinner
On Thu, Feb 04, 2016 at 03:28:05PM +0100, Jan Kara wrote:
> Add infrastructure for supporting get_nextdqblk() callback for VFS
> quotas. Translate the operation into a callback to appropriate
> filesystem and consequently to quota format callback.
> 
> Signed-off-by: Jan Kara 

I'm a little confused here. What patchset is this dependent on? i.e.
what introduces the ->get_nextdqblk method?

The patches I currently have in my XFS working tree introduce this
(quota: add new quotactl Q_XGETNEXTQUOTA) and everythign else is
dependent on this. I looked a coupl eof days ago and I wasnt' able
to find this in your tree.

I'd much prefer that one of us publish a stable branch with just the
quotactl() infrastructure (i.e. commands and bits up to the
->get_nextdqblk() callback) that we can then both base the different
subsystem implementations off, rather than one of us having to pull
in a whole tree of changes just to get the one commit we need...

Cheers,

Dave.
-- 
Dave Chinner
da...@fromorbit.com

___
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel