public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chandra Seetharaman <sekharan@us.ibm.com>
To: Ben Myers <bpm@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v9 1/6] xfs: Move code around and remove typedefs
Date: Mon, 24 Jun 2013 18:23:18 -0500	[thread overview]
Message-ID: <1372116198.22504.89.camel@chandra-dt.ibm.com> (raw)
In-Reply-To: <20130624213656.GA20932@sgi.com>

On Mon, 2013-06-24 at 16:36 -0500, Ben Myers wrote:
> Hi Chandra,
> 
> On Sun, Jun 23, 2013 at 09:48:22PM -0500, Chandra Seetharaman wrote:
> > Removed some typedefs, defined new functions, made some code clean up all in
> > preparation of the series.
> > 
> > No functional changes.
> > 
> > Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
> 
> As Dave mentioned, there are a few categories of changes that would probably be
> better as separate patches.  I count 6:
> 
> 1) the addition of xfs_is_quota_inode
> 
> 2) conversion of XFS_DQUOT_TREE macro to xfs_dquot_tree inlined function
> 
> 3) addition of xfs_dq_to_quota_inode
> 
> 4) cleanups in xfs_dquot.c (xfs_qm_quotacheck,xfs_qm_init_quotainos,
>    xfs_qm_vop_dqalloc,xfs_qm_vop_chown_reserve) and xfs_trans_dquot.c
>    (xfs_trans_reserve_quota_bydquots)
> 
> 5) changes to struct xfs_quotainfo.  I don't have an aversion to the comments
>    in the structure.  I'm guessing that you updated from xfs_inode_t to
>    struct xfs_inode and then ran into an 80 column issue later in the
>    structure.  It'd be nice to have the entries all line up, but I think
>    your compromise is fine.  Might have been better off touching only
>    the quota inodes and leaving the rest, but... style.
> 
> 6) add dqtypes enum, make an array in xfs_dquot_acct, update
>    xfs_trans_dup_dqinfo.  Now we have a two dimensional array in there, and 
>    I wonder if it would be better if it were more strongly typed.  e.g.
> 
>    tp->t_dqinfo->dq_type[j]->dqt_ents[i]
> 
>    (or something)

I will repost based on these suggestions.

<snip>

> > @@ -1697,14 +1695,14 @@ xfs_qm_vop_dqalloc(
> >  			 * holding ilock.
> >  			 */
> >  			xfs_iunlock(ip, lockflags);
> > -			if ((error = xfs_qm_dqget(mp, NULL, (xfs_dqid_t) uid,
> > +			error = xfs_qm_dqget(mp, NULL, (xfs_dqid_t) uid,
> >  						 XFS_DQ_USER,
> >  						 XFS_QMOPT_DQALLOC |
> >  						 XFS_QMOPT_DOWARN,
> > -						 &uq))) {
> > -				ASSERT(error != ENOENT);
> > +						 &uq);
> > +			ASSERT(error != ENOENT);
> 
> You have a series of these asserts which used to be in the error case taken out
> of the error case.  Clearly the assertion is still true when error == 0... but
> I tend to prefer that it still be in the error curlies.  A silly style thing
> which I welcome you to reject with prejudice.

This way I avoided a set of curly-braces for the error case. thats all.

> 
<snip>
> > @@ -113,7 +111,9 @@ xfs_trans_dup_dqinfo(
> >  	if(otp->t_flags & XFS_TRANS_DQ_DIRTY)
> >  		ntp->t_flags |= XFS_TRANS_DQ_DIRTY;
> >  
> > -	for (j = 0; j < 2; j++) {
> > +	for (j = 0; j < XFS_QM_TRANS_DQTYPES; j++) {
> > +		oqa = otp->t_dqinfo->dqs[j];
> > +		nqa = ntp->t_dqinfo->dqs[j];
> >  		for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) {
> >  			if (oqa[i].qt_dquot == NULL)
> >  				break;
> > @@ -138,8 +138,6 @@ xfs_trans_dup_dqinfo(
> >  			oq->qt_ino_res = oq->qt_ino_res_used;
> >  
> 
> Could clean up this extra line...

will do
> 
> 


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

  reply	other threads:[~2013-06-24 23:23 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 [this message]
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
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=1372116198.22504.89.camel@chandra-dt.ibm.com \
    --to=sekharan@us.ibm.com \
    --cc=bpm@sgi.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