lkml.org 
[lkml]   [2015]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] xfs: inode counter needs to use __percpu_counter_compare
On Tue, May 05, 2015 at 09:38:07PM -0700, Christoph Hellwig wrote:
> > diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
> > index 02f827f..900f8ce 100644
> > --- a/fs/xfs/xfs_mount.c
> > +++ b/fs/xfs/xfs_mount.c
> > @@ -1106,8 +1106,9 @@ xfs_mod_icount(
> > int64_t delta)
> > {
> > /* deltas are +/-64, hence the large batch size of 128. */
> > - __percpu_counter_add(&mp->m_icount, delta, 128);
> > - if (percpu_counter_compare(&mp->m_icount, 0) < 0) {
> > +#define _ICOUNT_BATCH 128
> > + __percpu_counter_add(&mp->m_icount, delta, _ICOUNT_BATCH);
>
> Can you give XFS_ prefixes to the atch sizes and move them otuside the
> function? And fix up the instance in xfs_mod_fdblocks as well while
> you're at it.

Sure.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com


\
 
 \ /
  Last update: 2015-05-06 08:21    [W:1.558 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site