All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/8] xfs: aborting inodes on shutdown may need buffer lock
Date: Sat, 2 Apr 2022 07:35:48 +1100	[thread overview]
Message-ID: <20220401203548.GL1544202@dread.disaster.area> (raw)
In-Reply-To: <YkbmQ/fJ+55fNDw9@infradead.org>

On Fri, Apr 01, 2022 at 04:47:15AM -0700, Christoph Hellwig wrote:
> On Wed, Mar 30, 2022 at 12:10:41PM +1100, Dave Chinner wrote:
> > xfs_iflush_abort() can be called without the buffer lock being held
> > resulting in inodes being removed from the buffer list while other
> > list operations are occurring. This causes problems with corrupted
> > bp->b_io_list inode lists during filesystem shutdown, leading to
> > traversals that never end, double removals from the AIL, etc.
> > 
> > Fix this by passing the buffer to xfs_iflush_abort() if we have
> > it locked. If the inode is attached to the buffer, we're going to
> > have to remove it from the buffer list and we'd have to get the
> > buffer off the inode log item to do that anyway.
> 
> There is not buffer passed to xfs_iflush_abort.  I think this now
> needs to say

Ah, left over from the original patch and I forgot to update it when
I split the buffer/no buffer aborts into two functions because it
was cleaner than trying to do it conditionally in
xfs_iflush_abort().

> "Fix this by ensuring the inode buffer is locked when calling 
> xfs_iflush_abort if the inode is attached to a buffer."

*nod*

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2022-04-01 20:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30  1:10 [PATCH 0/8 v3] xfs: more shutdown/recovery fixes Dave Chinner
2022-03-30  1:10 ` [PATCH 1/8] xfs: aborting inodes on shutdown may need buffer lock Dave Chinner
2022-03-30  1:21   ` Darrick J. Wong
2022-04-01 11:47   ` Christoph Hellwig
2022-04-01 20:35     ` Dave Chinner [this message]
2022-03-30  1:10 ` [PATCH 2/8] xfs: shutdown in intent recovery has non-intent items in the AIL Dave Chinner
2022-04-01 11:48   ` Christoph Hellwig
2022-03-30  1:10 ` [PATCH 3/8] xfs: run callbacks before waking waiters in xlog_state_shutdown_callbacks Dave Chinner
2022-04-01 11:51   ` Christoph Hellwig
2022-03-30  1:10 ` [PATCH 4/8] xfs: log shutdown triggers should only shut down the log Dave Chinner
2022-04-01 12:01   ` Christoph Hellwig
2022-04-01 20:32     ` Dave Chinner
2022-03-30  1:10 ` [PATCH 5/8] xfs: xfs_do_force_shutdown needs to block racing shutdowns Dave Chinner
2022-04-01 12:02   ` Christoph Hellwig
2022-03-30  1:10 ` [PATCH 6/8] xfs: xfs_trans_commit() path must check for log shutdown Dave Chinner
2022-04-01 12:03   ` Christoph Hellwig
2022-03-30  1:10 ` [PATCH 7/8] xfs: shutdown during log recovery needs to mark the " Dave Chinner
2022-04-01 12:05   ` Christoph Hellwig
2022-03-30  1:10 ` [PATCH 8/8] xfs: drop async cache flushes from CIL commits Dave Chinner
2022-04-01 12:06   ` Christoph Hellwig
2022-06-16 22:23   ` Williams, Dan J
2022-06-19 23:40     ` Dave Chinner
2022-06-20  6:14       ` Christoph Hellwig
2022-06-21 23:48       ` Dan Williams
2022-06-23  1:17         ` Dave Chinner
2022-06-23  4:37           ` Dan Williams

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=20220401203548.GL1544202@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --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 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.