xfs
[Top] [All Lists]

Re: [PATCH v8 2/5] xfs: Add pquota fields where gquota is used.

To: Jeff Liu <jeff.liu@xxxxxxxxxx>
Subject: Re: [PATCH v8 2/5] xfs: Add pquota fields where gquota is used.
From: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Date: Fri, 17 May 2013 16:15:44 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <51906528.3030307@xxxxxxxxxx>
Organization: IBM
References: <1368220889-25188-1-git-send-email-sekharan@xxxxxxxxxx> <1368220889-25188-3-git-send-email-sekharan@xxxxxxxxxx> <51906528.3030307@xxxxxxxxxx>
Reply-to: sekharan@xxxxxxxxxx
On Mon, 2013-05-13 at 11:59 +0800, Jeff Liu wrote:
> Hi,
> 
> On 05/11/2013 05:21 AM, Chandra Seetharaman wrote:
> > Add project quota changes to all the places where group quota field
> > is used:
> >    * add separate project quota members into various structures
> >    * split project quota and group quotas so that instead of overriding
> >      the group quota members incore, the new project quota members are
> >      used instead
> >    * get rid of usage of the OQUOTA flag incore, in favor of separate
> >    * group
> >      and project quota flags.
> >    * add a project dquot argument to various functions.
> > 
> > No externally visible interfaces changed.
> > 
> > Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>

<snip>

> > @@ -409,7 +421,10 @@ xfs_qm_dqattach_one(
> >              * be reclaimed as long as we have a ref from inode and we
> >              * hold the ilock.
> >              */
> > -           dqp = udqhint->q_gdquot;
> > +           if (type == XFS_DQ_GROUP)
> > +                   dqp = udqhint->q_gdquot;
> > +           else
> > +                   dqp = udqhint->q_pdquot;
> Maybe it's better to:
> dqp = "type == XFS_DQ_GROUP" ? udqhint->q_gdquot :
>                              udqhint->q_pdquot;

Jeff,

"if else" construct is preferred for readability than "? :" construct.

So, I am leaving it as is.


<snip>

<Prev in Thread] Current Thread [Next in Thread>