From: Chandra Seetharaman <sekharan@us.ibm.com>
To: Dave Chinner <david@fromorbit.com>, Ben Myers <bpm@sgi.com>,
Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
xfs@oss.sgi.com, Jan Kara <jack@suse.cz>,
Steven Whitehouse <swhiteho@redhat.com>,
Abhijith Das <adas@redhat.com>
Subject: Re: [PATCH 1/3] quota: Add a new quotactl command Q_XGETQSTATV
Date: Thu, 29 Aug 2013 12:00:00 -0500 [thread overview]
Message-ID: <1377795600.5925.1.camel@chandra-dt.ibm.com> (raw)
In-Reply-To: <1377119720.17321.6.camel@chandra-laptop.ibm.com>
Christoph, Dave, Ben,
What you suggest I should do w.r.t this patch ?
regards,
Chandra
On Wed, 2013-08-21 at 14:15 -0700, Chandra Seetharaman wrote:
> Chrishtoph,
>
> After we figured that there are ABI/API issues with adding pquota
> information to the end (while using the same command), I posted what you
> are suggesting now
> (http://oss.sgi.com/archives/xfs/2013-07/msg00212.html) as I also do not
> like redundant code. Please see Dave's comment at the link above in
> which he wanted me to change the code so that the two commands are
> totally independent. There was no objections to Dave's suggestion, so I
> made the changes as he suggested.
>
> On Wed, 2013-08-21 at 11:19 -0700, Christoph Hellwig wrote:
> > On Wed, Aug 21, 2013e at 01:12:47PM -0500, Ben Myers wrote:
> > > So you don't like the addition of .get_xstatev in quotactl_ops, and
> > > fs_quota_stat would need to match with fs_quota_statv, adding the project quota
> > > to the end of the structure?
> >
> > That was what I had in mind initially, before the additional
> > complication were pointed out, except that we don't need it to look
> > exactly the same - if we use put_user calls instead of copy_to_user that
> > layout doesn't have to be the same.
> >
> > However it seems like going down the stat route and having a kquota_info
> > structure might be the better way to fully separate the in-kernel API
> > from the userspace ABI.
> >
> > > > Well, the trouble is with gquota vs pquota - previously we report in
> > > > qs_gquota field either group quotas or project quotas depending on what is
> > > > turned on. Generic quota code doesn't know this so xfs get_xstatev() would
> > > > have to recognize whether it is being called from the old Q_XGETSTAT
> > > > quotactl or from the new Q_XGETSTATV quotactl to know where to fill in
> > > > project quotas. And at that point you somewhat loose the elegancy of using
> > > > one interface - we could set qs_version to some special value so that
> > > > .get_xstatev() recognizes this and does the magic but that doesn't seem very
> > > > different from the extra call...
> > >
> > > IIUC to make this happen without the addition of .get_xstate in quotactl_ops,
> > > .get_xstate could also grow an argument to determine whether it was called as
> > > Q_XGETSTAT vs Q_XGETSTATV. If called as Q_XGETSTATV it can look at qs_version
> > > to determine how much to copy. That might be a bit cleaner than the qs_version
> > > magic number, as long as you don't mind changing the .get_xstate interface.
> >
> > I don't think we'd need that argument - the fs would always fill out
> > both fields, then the implementation of Q_XGETSTAT would:
> >
> > (1) fail if both group and project quota information is present
>
> There was a discussion on this issue and it was decided to provide back
> only gquota information when both quotas are present and Q_XGETSTAT
> command was used (instead of failing, which will break API)
>
> > (2) export the pquota fields as gqouta if only project quota is present
> >
> > > Anyway, please give a shout if I need to revert this. I believe the commit
> > > raced with the commentary. ;)
> >
> > As this is in-kernel only I don't think we need to revert anything, but
> > it would be nice to fix it before 3.12 is released. I didn't exactly
> > race either, your reply to Jan made me look a it a bit more.
> >
> > _______________________________________________
> > xfs mailing list
> > xfs@oss.sgi.com
> > http://oss.sgi.com/mailman/listinfo/xfs
> >
>
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-08-29 17:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 22:27 [PATCH 0/3] Add a new quotactl command to support 3 quota types in XFS Chandra Seetharaman
2013-08-06 22:27 ` [PATCH 1/3] quota: Add a new quotactl command Q_XGETQSTATV Chandra Seetharaman
2013-08-13 20:42 ` Rich Johnston
2013-08-13 20:50 ` Chandra Seetharaman
2013-08-13 21:22 ` Jan Kara
2013-08-13 22:22 ` Rich Johnston
2013-08-13 22:39 ` Chandra Seetharaman
2013-08-14 9:31 ` Jan Kara
2013-08-21 6:43 ` Christoph Hellwig
2013-08-21 13:01 ` Jan Kara
2013-08-21 18:12 ` Ben Myers
2013-08-21 18:19 ` Christoph Hellwig
2013-08-21 21:15 ` Chandra Seetharaman
2013-08-29 17:00 ` Chandra Seetharaman [this message]
2013-08-29 17:48 ` Ben Myers
2013-08-06 22:27 ` [PATCH 2/3] xfs: Add support for the Q_XGETQSTATV Chandra Seetharaman
2013-08-13 20:42 ` Rich Johnston
2013-08-06 22:27 ` [PATCH 3/3] gfs2: " Chandra Seetharaman
2013-08-13 20:42 ` Rich Johnston
2013-08-20 22:25 ` [PATCH 0/3] Add a new quotactl command to support 3 quota types in XFS Ben Myers
2013-08-21 12:28 ` Steven Whitehouse
2013-08-21 17:44 ` Ben Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377795600.5925.1.camel@chandra-dt.ibm.com \
--to=sekharan@us.ibm.com \
--cc=adas@redhat.com \
--cc=bpm@sgi.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=swhiteho@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox