public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chandra Seetharaman <sekharan@us.ibm.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v9 3/6] xfs: Add pquota fields where gquota is used.
Date: Mon, 24 Jun 2013 18:25:04 -0500	[thread overview]
Message-ID: <1372116304.22504.92.camel@chandra-dt.ibm.com> (raw)
In-Reply-To: <20130624080000.GN29376@dastard>

On Mon, 2013-06-24 at 18:00 +1000, Dave Chinner wrote:

<snip>
> > @@ -559,8 +596,13 @@ xfs_qm_dqattach_locked(
> >  		 * 100% all the time. It is just a hint, and this will
> >  		 * succeed in general.
> >  		 */
> > -		if (ip->i_udquot->q_gdquot != ip->i_gdquot)
> > -			xfs_qm_dqattach_grouphint(ip->i_udquot, ip->i_gdquot);
> > +		if (XFS_IS_GQUOTA_ON(mp) &&
> > +				ip->i_udquot->q_gdquot != ip->i_gdquot)
> > +			xfs_qm_dqattach_hint(ip, XFS_DQ_GROUP);
> > +
> > +		if (XFS_IS_PQUOTA_ON(mp) &&
> > +				ip->i_udquot->q_pdquot != ip->i_pdquot)
> > +			xfs_qm_dqattach_hint(ip, XFS_DQ_PROJ);
> 
> Why do we need the XFS_IS_GQUOTA_ON/XFS_IS_PQUOTA_ON checks there?
> If group quotas are not on, then both the hint and in the
> inode pointers to the group dquot will be NULL, and therefore equal?
> i.e. we don't need to even check if quotas are enabled here...
> 
> Indeed, why pass (ip, quota type) to xfs_qm_dqattach_hint()? why not
> just pass the locations directly like:
> 
> 			xfs_qm_dqattach_hint(&ip->i_udquot->q_pdquot,
> 					     ip->i_pdquot):
> 

Just looked at xfs_qm_dqattach_hint(), it grabs the dqlock of
ip->i_udquot, which means I have to have i_udquot also as another
parameter.


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

  parent reply	other threads:[~2013-06-24 23:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24  2:48 [PATCH v9 0/6] Allow pquota and gquota to be used together Chandra Seetharaman
2013-06-24  2:48 ` [PATCH v9 1/6] xfs: Move code around and remove typedefs Chandra Seetharaman
2013-06-24  5:31   ` Dave Chinner
2013-06-24 22:21     ` Chandra Seetharaman
2013-06-24 21:36   ` Ben Myers
2013-06-24 23:23     ` Chandra Seetharaman
2013-06-24  2:48 ` [PATCH v9 2/6] xfs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
2013-06-24  5:59   ` Dave Chinner
2013-06-24 22:25     ` Chandra Seetharaman
2013-06-25  5:32       ` Dave Chinner
2013-06-24  2:48 ` [PATCH v9 3/6] xfs: Add pquota fields where gquota is used Chandra Seetharaman
2013-06-24  8:00   ` Dave Chinner
2013-06-24 22:33     ` Chandra Seetharaman
2013-06-24 23:25     ` Chandra Seetharaman [this message]
2013-06-25  5:33       ` Dave Chinner
2013-06-24  2:48 ` [PATCH v9 4/6] xfs: Start using pquotaino from the superblock Chandra Seetharaman
2013-06-25  6:31   ` Dave Chinner
2013-07-01 15:50     ` Chandra Seetharaman
2013-07-04  1:12       ` Dave Chinner
2013-07-08 23:20         ` Chandra Seetharaman
2013-07-09  1:21           ` Dave Chinner
2013-07-09 21:06             ` Chandra Seetharaman
2013-06-24  2:48 ` [PATCH v9 5/6] xfs: Add proper versioning support to fs_quota_stat Chandra Seetharaman
2013-06-25  6:43   ` Dave Chinner
2013-06-25 22:36     ` Chandra Seetharaman
2013-06-26  1:20       ` Dave Chinner
2013-06-24  2:48 ` [PATCH v9 6/6] xfs: Use new qs_pquota field in fs_quota_stat for Q_XGETQSTAT Chandra Seetharaman
2013-06-25  6:45   ` Dave Chinner

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=1372116304.22504.92.camel@chandra-dt.ibm.com \
    --to=sekharan@us.ibm.com \
    --cc=david@fromorbit.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