From: David Sterba <dsterba@suse.cz>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH v2] btrfs: mark ordered extent and inode with error if we fail to finish
Date: Fri, 21 May 2021 14:33:08 +0200 [thread overview]
Message-ID: <20210521123308.GH7604@twin.jikos.cz> (raw)
In-Reply-To: <5b855fadb3c1de5be46d01b23c77e512933de3b9.1621431374.git.josef@toxicpanda.com>
On Wed, May 19, 2021 at 09:38:27AM -0400, Josef Bacik wrote:
> While doing error injection testing I saw that sometimes we'd get an
> abort that wouldn't stop the current transaction commit from completing.
> This abort was coming from finish ordered IO, but at this point in the
> transaction commit we should have gotten an error and stopped.
>
> It turns out the abort came from finish ordered io while trying to write
> out the free space cache. It occurred to me that any failure inside of
> finish_ordered_io isn't actually raised to the person doing the writing,
> so we could have any number of failures in this path and think the
> ordered extent completed successfully and the inode was fine.
>
> Fix this by marking the ordered extent with BTRFS_ORDERED_IOERR, and
> marking the mapping of the inode with mapping_set_error, so any callers
> that simply call fdatawait will also get the error.
>
> With this we're seeing the IO error on the free space inode when we fail
> to do the finish_ordered_io.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Added to misc-next, thanks.
prev parent reply other threads:[~2021-05-21 12:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 13:38 [PATCH v2] btrfs: mark ordered extent and inode with error if we fail to finish Josef Bacik
2021-05-21 12:33 ` David Sterba [this message]
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=20210521123308.GH7604@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@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).