From: Josef Bacik <josef@toxicpanda.com>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>,
David Sterba <dsterba@suse.cz>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: handle errors from async submission
Date: Wed, 29 Jul 2020 10:01:31 -0400 [thread overview]
Message-ID: <e3a95f23-b87f-c7ca-6a63-bc6db9c34ba9@toxicpanda.com> (raw)
In-Reply-To: <20200728112541.3401-1-johannes.thumshirn@wdc.com>
On 7/28/20 7:25 AM, Johannes Thumshirn wrote:
> Btrfs' async submit mechanism is able to handle errors in the submission
> path and the meta-data async submit function correctly passes the error
> code to the caller.
>
> In btrfs_submit_bio_start() and btrfs_submit_bio_start_direct_io() we're
> not handling the errors returned by btrfs_csum_one_bio() correctly though
> and simply call BUG_ON(). This is unnecessary as the caller of these two
> functions - run_one_async_start - correctly checks for the return values
> and sets the status of the async_submit_bio. The actual bio submission
> will be handled later on by run_one_async_done only if
> async_submit_bio::status is 0, so the data won't be written if we
> encountered an error in the checksum process.
>
> Simply return the error from btrfs_csum_one_bio() to the async submitters,
> like it's done in btree_submit_bio_start().
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Thanks,
Josef
next prev parent reply other threads:[~2020-07-29 14:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 11:25 [PATCH] btrfs: handle errors from async submission Johannes Thumshirn
2020-07-29 14:01 ` Josef Bacik [this message]
2020-07-30 16:46 ` David Sterba
2020-07-31 7:39 ` Johannes Thumshirn
2020-07-31 14:12 ` David Sterba
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=e3a95f23-b87f-c7ca-6a63-bc6db9c34ba9@toxicpanda.com \
--to=josef@toxicpanda.com \
--cc=dsterba@suse.cz \
--cc=johannes.thumshirn@wdc.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).