Re: [PATCH 07/18] xfs: stop using q_core limits in the quota code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 01, 2020 at 04:33:30PM -0700, Darrick J. Wong wrote:
> On Wed, Jul 01, 2020 at 04:13:43PM -0700, Darrick J. Wong wrote:
> > On Thu, Jul 02, 2020 at 09:01:36AM +1000, Dave Chinner wrote:
> > > On Tue, Jun 30, 2020 at 08:42:36AM -0700, Darrick J. Wong wrote:
> > > > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > > > 
> > > > Add limits fields in the incore dquot, and use that instead of the ones
> > > > in qcore.  This eliminates a bunch of endian conversions and will
> > > > eventually allow us to remove qcore entirely.
> > > > 
> > > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > > ....
> > > > @@ -124,82 +123,67 @@ xfs_qm_adjust_dqtimers(
> > > >  	defq = xfs_get_defquota(qi, xfs_dquot_type(dq));
> > > >  
> > > >  #ifdef DEBUG
> > > > -	if (d->d_blk_hardlimit)
> > > > -		ASSERT(be64_to_cpu(d->d_blk_softlimit) <=
> > > > -		       be64_to_cpu(d->d_blk_hardlimit));
> > > > -	if (d->d_ino_hardlimit)
> > > > -		ASSERT(be64_to_cpu(d->d_ino_softlimit) <=
> > > > -		       be64_to_cpu(d->d_ino_hardlimit));
> > > > -	if (d->d_rtb_hardlimit)
> > > > -		ASSERT(be64_to_cpu(d->d_rtb_softlimit) <=
> > > > -		       be64_to_cpu(d->d_rtb_hardlimit));
> > > > +	if (dq->q_blk.hardlimit)
> > > > +		ASSERT(dq->q_blk.softlimit <= dq->q_blk.hardlimit);
> > > > +	if (dq->q_ino.hardlimit)
> > > > +		ASSERT(dq->q_ino.softlimit <= dq->q_ino.hardlimit);
> > > > +	if (dq->q_rtb.hardlimit)
> > > > +		ASSERT(dq->q_rtb.softlimit <= dq->q_rtb.hardlimit);
> > > >  #endif
> > > 
> > > You can get rid of the ifdef DEBUG here - if ASSERT is not defined
> > > then the compiler will elide all this code anyway.
> > 
> > OK.
> 
> Actually, not ok.  A later patch in this series will refactor this whole
> ugly function (and in the next round the #ifdefs) out of existence, so
> I'll leave this part of the patch the way it is.

Ok.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux