From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH 2/2] xfs: inode counter needs to use __percpu_counter_compare
Date: Wed, 6 May 2015 15:45:44 +1000 [thread overview]
Message-ID: <20150506054544.GB4327@dastard> (raw)
In-Reply-To: <20150506043807.GB10940@infradead.org>
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
WARNING: multiple messages have this Message-ID (diff)
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: inode counter needs to use __percpu_counter_compare
Date: Wed, 6 May 2015 15:45:44 +1000 [thread overview]
Message-ID: <20150506054544.GB4327@dastard> (raw)
In-Reply-To: <20150506043807.GB10940@infradead.org>
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
next prev parent reply other threads:[~2015-05-06 5:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 22:01 [PATCH 0/2] xfs: fix inode count underrun Dave Chinner
2015-05-05 22:01 ` Dave Chinner
2015-05-05 22:01 ` [PATCH 1/2] percpu_counter: batch size aware __percpu_counter_compare() Dave Chinner
2015-05-05 22:01 ` Dave Chinner
2015-05-06 4:36 ` Christoph Hellwig
2015-05-06 4:36 ` Christoph Hellwig
2015-05-06 4:46 ` Christoph Hellwig
2015-05-06 4:46 ` Christoph Hellwig
2015-05-06 5:43 ` Dave Chinner
2015-05-06 5:43 ` Dave Chinner
2015-05-06 5:53 ` Dave Chinner
2015-05-06 5:53 ` Dave Chinner
2015-05-06 6:11 ` Dave Chinner
2015-05-06 6:11 ` Dave Chinner
2015-05-05 22:01 ` [PATCH 2/2] xfs: inode counter needs to use __percpu_counter_compare Dave Chinner
2015-05-05 22:01 ` Dave Chinner
2015-05-06 4:38 ` Christoph Hellwig
2015-05-06 4:38 ` Christoph Hellwig
2015-05-06 5:45 ` Dave Chinner [this message]
2015-05-06 5: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=20150506054544.GB4327@dastard \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.