From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/4] xfs: xfs_iflock is no longer a completion
Date: Wed, 1 Jul 2020 15:48:50 +1000 [thread overview]
Message-ID: <20200701054850.GR2005@dread.disaster.area> (raw)
In-Reply-To: <20200624153652.GD9914@bfoster>
On Wed, Jun 24, 2020 at 11:36:52AM -0400, Brian Foster wrote:
> On Tue, Jun 23, 2020 at 07:50:12PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > With the recent rework of the inode cluster flushing, we no longer
> > ever wait on the the inode flush "lock". It was never a lock in the
> > first place, just a completion to allow callers to wait for inode IO
> > to complete. We now never wait for flush completion as all inode
> > flushing is non-blocking. Hence we can get rid of all the iflock
> > infrastructure and instead just set and check a state flag.
> >
> > Rename the XFS_IFLOCK flag to XFS_IFLUSHING, convert all the
> > xfs_iflock_nowait() test-and-set operations on that flag, and
> > replace all the xfs_ifunlock() calls to clear operations.
> >
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > ---
>
> I'd call it IFLUSHED vs. IFLUSHING, but I'm not going to harp on that.
> Just a few nits, otherwise looks like a nice cleanup.
I thought about "flushed" but that implies something that has
alerady happened in the past (e.g. XFS_ITRUNCATED) rather than
something that is currently happening. i.e. we are wanting to know
if a flush is in progress right now, not whether a flush has been
done in the past...
> > fs/xfs/xfs_icache.c | 19 ++++++------
> > fs/xfs/xfs_inode.c | 67 +++++++++++++++--------------------------
> > fs/xfs/xfs_inode.h | 33 +-------------------
> > fs/xfs/xfs_inode_item.c | 6 ++--
> > fs/xfs/xfs_inode_item.h | 4 +--
> > 5 files changed, 39 insertions(+), 90 deletions(-)
> >
> > diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
> > index a973f180c6cd..0d73559f2d58 100644
> > --- a/fs/xfs/xfs_icache.c
> > +++ b/fs/xfs/xfs_icache.c
> ...
> > @@ -1045,23 +1044,23 @@ xfs_reclaim_inode(
> >
> > if (!xfs_ilock_nowait(ip, XFS_ILOCK_EXCL))
> > goto out;
> > - if (!xfs_iflock_nowait(ip))
> > + if (xfs_iflags_test_and_set(ip, XFS_IFLUSHING))
> > goto out_iunlock;
> >
> > if (XFS_FORCED_SHUTDOWN(ip->i_mount)) {
> > xfs_iunpin_wait(ip);
> > /* xfs_iflush_abort() drops the flush lock */
>
> The flush what? ;P
>
> > xfs_iflush_abort(ip);
> > + ASSERT(!xfs_iflags_test(ip, XFS_IFLUSHING));
>
> Seems a bit superfluous right after the abort.
Yup, I'll that clean up and the comments the search and replace I
did missed.
Thanks!
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2020-07-01 5:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 9:50 [PATCH 0/4] [RFC] xfs: in memory inode unlink log items Dave Chinner
2020-06-23 9:50 ` [PATCH 1/4] xfs: xfs_iflock is no longer a completion Dave Chinner
2020-06-24 15:36 ` Brian Foster
2020-07-01 5:48 ` Dave Chinner [this message]
2020-06-23 9:50 ` [PATCH 2/4] xfs: add log item precommit operation Dave Chinner
2020-06-30 18:06 ` Darrick J. Wong
2020-07-01 14:30 ` Brian Foster
2020-07-01 22:02 ` Dave Chinner
2020-06-23 9:50 ` [PATCH 3/4] xfs: track unlinked inodes in core inode Dave Chinner
2020-07-01 8:59 ` Gao Xiang
2020-07-01 22:06 ` Dave Chinner
2020-07-01 14:31 ` Brian Foster
2020-07-01 22:18 ` Dave Chinner
2020-07-02 12:24 ` Brian Foster
2020-07-07 14:39 ` Gao Xiang
2020-06-23 9:50 ` [PATCH 4/4] xfs: introduce inode unlink log item Dave Chinner
2020-06-30 18:19 ` Darrick J. Wong
2020-06-30 22:31 ` Gao Xiang
2020-07-01 6:26 ` Dave Chinner
2020-07-01 14:32 ` Brian Foster
2020-07-01 22:24 ` Dave Chinner
2020-07-02 12:25 ` Brian Foster
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=20200701054850.GR2005@dread.disaster.area \
--to=david@fromorbit.com \
--cc=bfoster@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).