public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v8 3/5] xfs: Start using pquotaino from the superblock
Date: Tue, 11 Jun 2013 09:20:45 +1000	[thread overview]
Message-ID: <20130610232045.GE29376@dastard> (raw)
In-Reply-To: <1369433343.9551.958.camel@chandra-dt.ibm.com>

On Fri, May 24, 2013 at 05:09:03PM -0500, Chandra Seetharaman wrote:
> On Fri, 2013-05-17 at 14:46 +1000, Dave Chinner wrote:
> > On Fri, May 10, 2013 at 04:21:27PM -0500, Chandra Seetharaman wrote:
> > > Define a macro to check if the superblock has pquotino.
> > > 
> > > Keep backward compatibilty by alowing mount of older superblock
> > > with no separate pquota inode.
> > ....
> > 
> > > @@ -657,27 +680,51 @@ xfs_sb_to_disk(
> > >  	int		first;
> > >  	int		size;
> > >  	__uint16_t	qflags = from->sb_qflags;
> > > +	xfs_ino_t	gquotino = from->sb_gquotino;
> > >  
> > >  	ASSERT(fields);
> > >  	if (!fields)
> > >  		return;
> > >  
> > > -	if (fields & XFS_SB_QFLAGS) {
> > > +	if (!xfs_sb_version_has_pquota(from)) {
> > 
> > This should be moved to a separate function, I think.
> > 
> > > +		if (fields & XFS_SB_QFLAGS) {
> > > +			/*
> > > +			 * The in-core version of sb_qflags do not have
> > > +			 * XFS_OQUOTA_* flags, whereas the on-disk version
> > > +			 * does.  So, convert incore XFS_{PG}QUOTA_* flags
> > > +			 * to on-disk XFS_OQUOTA_* flags.
> > > +			 */
> > > +			qflags &= ~(XFS_PQUOTA_ENFD | XFS_PQUOTA_CHKD |
> > > +					XFS_GQUOTA_ENFD | XFS_GQUOTA_CHKD);
> > > +
> > > +			if (from->sb_qflags &
> > > +					(XFS_PQUOTA_ENFD | XFS_GQUOTA_ENFD))
> > > +				qflags |= XFS_OQUOTA_ENFD;
> > > +			if (from->sb_qflags &
> > > +					(XFS_PQUOTA_CHKD | XFS_GQUOTA_CHKD))
> > > +				qflags |= XFS_OQUOTA_CHKD;
> > 
> > Now that we have the new flags set correct, write it directly to
> > to->sb_qflags and clear XFS_SB_QFLAGS from the fields varaible.
> 
> So, you are suggesting to move this block of functionality to a new
> function, and set the fields in the "to" data structure in that function
> and clear the appropriate bits in the same function ?

Yes.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-06-10 23:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 21:21 [PATCH v8 0/5] xfs: Allow pquota and gquota to be used together Chandra Seetharaman
2013-05-10 21:21 ` [PATCH v8 1/5] xfs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
2013-05-13  3:15   ` Jeff Liu
2013-05-14 22:19     ` Chandra Seetharaman
2013-05-17  2:55   ` Dave Chinner
2013-05-24 21:45     ` Chandra Seetharaman
2013-05-10 21:21 ` [PATCH v8 2/5] xfs: Add pquota fields where gquota is used Chandra Seetharaman
2013-05-13  3:59   ` Jeff Liu
2013-05-17  3:01     ` Dave Chinner
2013-05-17  5:40       ` Jeff Liu
2013-05-17 21:15     ` Chandra Seetharaman
2013-05-17  4:23   ` Dave Chinner
2013-05-24 21:57     ` Chandra Seetharaman
2013-06-10 23:17       ` Dave Chinner
2013-06-11 23:08         ` Chandra Seetharaman
2013-05-10 21:21 ` [PATCH v8 3/5] xfs: Start using pquotaino from the superblock Chandra Seetharaman
2013-05-13  4:24   ` Jeff Liu
2013-05-17  4:46   ` Dave Chinner
2013-05-24 22:09     ` Chandra Seetharaman
2013-06-10 23:20       ` Dave Chinner [this message]
2013-05-10 21:21 ` [PATCH v8 4/5] xfs: Add proper versioning support to fs_quota_stat Chandra Seetharaman
2013-05-13  4:29   ` Jeff Liu
2013-05-17  5:10   ` Dave Chinner
2013-05-24 22:17     ` Chandra Seetharaman
2013-06-10 23:27       ` Dave Chinner
2013-06-11 23:13         ` Chandra Seetharaman
2013-05-10 21:21 ` [PATCH v8 5/5] xfs: Use new qs_pquota field in fs_quota_stat for Q_XGETQSTAT Chandra Seetharaman
2013-05-17  5:14   ` Dave Chinner
2013-05-24 22:17     ` Chandra Seetharaman

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=20130610232045.GE29376@dastard \
    --to=david@fromorbit.com \
    --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