From: Steven Whitehouse <swhiteho@redhat.com>
To: sekharan@us.ibm.com
Cc: Jan Kara <jack@suse.cz>, Ben Myers <bpm@sgi.com>,
adas@redhat.com, xfs@oss.sgi.com
Subject: Re: [PATCH v10 10/11] quota: Add proper versioning support to fs_quota_stat
Date: Thu, 11 Jul 2013 08:51:20 +0100 [thread overview]
Message-ID: <1373529080.2721.0.camel@menhir> (raw)
In-Reply-To: <1373516161.4555.10.camel@chandra-laptop.ibm.com>
Hi,
Copying in Abhi, since he is the quota expert on the GFS2 side,
Steve.
On Wed, 2013-07-10 at 23:16 -0500, Chandra Seetharaman wrote:
> On Thu, 2013-07-11 at 11:45 +1000, Dave Chinner wrote:
> > On Wed, Jul 10, 2013 at 03:49:50PM -0500, Chandra Seetharaman wrote:
> > > On Wed, 2013-07-10 at 18:26 +0200, Jan Kara wrote:
> > > > On Wed 10-07-13 10:55:38, Ben Myers wrote:
> > > > > Hey Chandra,
> > >
> > > <snip>
> > >
> > > > > > diff --git a/fs/quota/quota.c b/fs/quota/quota.c
> > > > > > index c7314f1..ae6526e 100644
> > > > > > --- a/fs/quota/quota.c
> > > > > > +++ b/fs/quota/quota.c
> > > > > > @@ -207,12 +207,57 @@ static int quota_setxstate(struct super_block *sb, int cmd, void __user *addr)
> > > > > > static int quota_getxstate(struct super_block *sb, void __user *addr)
> > > > > > {
> > > > > > struct fs_quota_stat fqs;
> > > > > > - int ret;
> > > > > > + struct fs_quota_stat_v1 fqs_v1;
> > > > > > + int ret, size;
> > > > > > + void *fqsp;
> > > > > >
> > > > > > if (!sb->s_qcop->get_xstate)
> > > > > > return -ENOSYS;
> > > > > > +
> > > > > > + memset(&fqs, 0, sizeof(struct fs_quota_stat));
> > > > > > + if (copy_from_user(&fqs, addr, 1)) /* just get the version */
> > > > > > + return -EFAULT;
> > > > > > +
> > > > > > + switch (fqs.qs_version) {
> > > > > > + case FS_QSTAT_VERSION_2:
> > > > > > + size = FS_QSTAT_V2_SIZE;
> > > > > > + break;
> > > > > > + default:
> > > > > > + fqs.qs_version = FS_QSTAT_VERSION;
> > > > > > + /* fallthrough */
> > > > > > + case FS_QSTAT_VERSION:
> > > > > > + size = FS_QSTAT_V1_SIZE;
> > > > > > + break;
> > > > > > + }
> > > > Guys, you cannot really do this. If anyone is using getxstate() with
> > > > uninitialized buffer (which is fine so far), you cannot suddently start to
> > > > rely on the contents of qs_version field. That's ABI (and even API)
> > > > breakage.
> > >
> > > Agree, it is a API breakage.
> > >
> > > Will fix it by adding a new quotactl value as you suggest.
> >
> > Please enforce the version number as being valid so we don't
> > need to add another new interface if we need to change this
> > structure again. :)
>
> Yes, I am keeping the lower level interface same as before.
>
> >
> > FWIW, we're now going to need a new xfs_quota changes to go along
> > with this - it will need to use the new interface by default, and
> > fall back to the existing interface if it gets an error saying the
> > command does not exist. We can't actually test the new interface
> > until we have xfs_quota patches that use it.
>
> The lower level interface doesn't change. It will remain the same. I
> will send the code soon.
>
> >
> > And to play Devil's advocate: it is way too late in the merge cycle
> > to make these sorts of ABI changes to a patch and test/review them
> > adequately.
>
> There is no ABI issues even in the earlier version, it was an API
> breakage. And with Jan's suggestion even that API breakage is being
> fixed. There is no change in API or ABI. We are just adding a new
> interface.
>
> Old code and old binary will work as before.
>
> >
> > Cheers,
> >
> > Dave.
>
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-07-11 7:55 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 22:25 [PATCH v10 00/11] Allow pquota and gquota to be used together Chandra Seetharaman
2013-06-27 22:25 ` [PATCH v10 01/11] xfs: Define a new function xfs_is_quota_inode() Chandra Seetharaman
2013-06-27 22:43 ` Ben Myers
2013-06-27 22:25 ` [PATCH v10 02/11] xfs: Replace macro XFS_DQUOT_TREE with a function Chandra Seetharaman
2013-06-27 23:19 ` Ben Myers
2013-06-27 22:25 ` [PATCH v10 03/11] xfs: Replace macro XFS_DQ_TO_QIP " Chandra Seetharaman
2013-06-27 23:23 ` Ben Myers
2013-06-27 22:25 ` [PATCH v10 04/11] xfs: Code cleanup and removal of some typedef usage Chandra Seetharaman
2013-06-27 23:50 ` Ben Myers
2013-06-27 22:25 ` [PATCH v10 05/11] xfs: Do some whitespace cleanup in the data structure xfs_quotainfo Chandra Seetharaman
2013-06-28 16:30 ` Ben Myers
2013-06-28 18:14 ` Chandra Seetharaman
2013-06-28 18:31 ` Ben Myers
2013-06-27 22:25 ` [PATCH v10 06/11] xfs: Change xfs_dquot_acct to be a 2-dimensional array Chandra Seetharaman
2013-06-28 19:06 ` Ben Myers
2013-06-27 22:25 ` [PATCH v10 07/11] xfs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
2013-06-28 22:36 ` Ben Myers
2013-06-27 22:25 ` [PATCH v10 08/11] xfs: Add pquota fields where gquota is used Chandra Seetharaman
2013-07-10 21:39 ` Ben Myers
2013-07-10 21:46 ` Chandra Seetharaman
2013-07-11 1:23 ` Dave Chinner
2013-07-11 4:05 ` Chandra Seetharaman
2013-06-27 22:25 ` [PATCH v10 09/11] xfs: Start using pquotaino from the superblock Chandra Seetharaman
2013-07-01 2:06 ` Dave Chinner
2013-07-01 17:59 ` Chandra Seetharaman
2013-07-03 17:12 ` Chandra Seetharaman
2013-07-04 1:35 ` Dave Chinner
2013-06-27 22:25 ` [PATCH v10 10/11] quota: Add proper versioning support to fs_quota_stat Chandra Seetharaman
2013-07-10 15:55 ` Ben Myers
2013-07-10 16:26 ` Jan Kara
2013-07-10 18:47 ` Ben Myers
2013-07-10 21:52 ` Jan Kara
2013-07-10 20:49 ` Chandra Seetharaman
2013-07-10 21:54 ` Jan Kara
2013-07-11 1:45 ` Dave Chinner
2013-07-11 4:16 ` Chandra Seetharaman
2013-07-11 7:18 ` Dave Chinner
2013-07-11 7:51 ` Steven Whitehouse [this message]
2013-06-27 22:25 ` [PATCH v10 11/11] xfs: Use new qs_pquota field in fs_quota_stat for Q_XGETQSTAT Chandra Seetharaman
2013-06-28 22:53 ` [PATCH v10 00/11] Allow pquota and gquota to be used together 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=1373529080.2721.0.camel@menhir \
--to=swhiteho@redhat.com \
--cc=adas@redhat.com \
--cc=bpm@sgi.com \
--cc=jack@suse.cz \
--cc=sekharan@us.ibm.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