From: Dave Chinner <david@fromorbit.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: kernel-team@fb.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: take a ref on failed bufs in xfs_inode_item_push
Date: Wed, 14 Nov 2018 19:10:53 +1100 [thread overview]
Message-ID: <20181114081053.GV19305@dastard> (raw)
In-Reply-To: <20181112142347.gh2biojf6suzngjr@MacBook-Pro-91.local>
On Mon, Nov 12, 2018 at 09:23:48AM -0500, Josef Bacik wrote:
> On Thu, Nov 08, 2018 at 10:37:40AM +1100, Dave Chinner wrote:
> > xfs: fix transient reference count error in xfs_buf_resubmit_failed_buffers
> >
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > When retrying a failed inode or dquot buffer,
> > xfs_buf_resubmit_failed_buffers() clears all the failed flags from
> > the inode/dquot log items. In doing so, it also drops all the
> > reference counts on the buffer that the failed log items hold. This
> > means it can drop all the active references on the buffer and hence
> > free the buffer before it queues it for write again.
> >
> > Putting the buffer on the delwri queue takes a reference to the
> > buffer (so that it hangs around until it has been written and
> > completed), but this goes bang if the buffer has already been freed.
> >
> > Hence we need to add the buffer to the delwri queue before we remove
> > the failed flags from the log items attached to the buffer to ensure
> > it always remains referenced during the resubmit process.
> >
> > Reported-by: Josef Bacik <josef@toxicpanda.com>
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
>
> Dave,
>
> Are you planning on sending this along as is? I'm going to throw it in our
> kernel if you are happy with it. Thanks,
I'm planning to, it's just my stack of fixes is growing faster than
I can QA them at the moment.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-11-14 18:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 20:10 [PATCH 0/2] xfs: fix panics seen with error injection Josef Bacik
2018-11-07 20:10 ` [PATCH 1/2] xfs: change xfs_buf_ioapply_map to STATIC Josef Bacik
2018-11-15 10:19 ` Christoph Hellwig
2018-11-07 20:10 ` [PATCH 2/2] xfs: take a ref on failed bufs in xfs_inode_item_push Josef Bacik
2018-11-07 23:37 ` Dave Chinner
2018-11-07 23:43 ` Josef Bacik
2018-11-08 0:48 ` Dave Chinner
2018-11-08 1:43 ` Josef Bacik
2018-11-07 23:57 ` Josef Bacik
2018-11-08 19:36 ` Josef Bacik
2018-11-12 14:23 ` Josef Bacik
2018-11-13 5:12 ` Darrick J. Wong
2018-11-14 8:10 ` Dave Chinner [this message]
2018-11-07 22:55 ` [PATCH 0/2] xfs: fix panics seen with error injection 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=20181114081053.GV19305@dastard \
--to=david@fromorbit.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.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