From: Johannes Thumshirn <jthumshirn@suse.de>
To: Nikolay Borisov <nborisov@suse.com>, David Sterba <dsterba@suse.com>
Cc: Linux BTRFS Mailinglist <linux-btrfs@vger.kernel.org>,
Qu Wenruo <wqu@suse.com>
Subject: Re: [PATCH v2] btrfs: factor our read/write stage off csum_tree_block() into its callers
Date: Tue, 19 Feb 2019 13:15:15 +0100 [thread overview]
Message-ID: <4022a4b0-abc0-c44f-2254-399f80f34d38@suse.de> (raw)
In-Reply-To: <b143da86-813d-12fe-0bd9-27e005f56366@suse.com>
On 19/02/2019 13:00, Nikolay Borisov wrote:
>> - return csum_tree_block(fs_info, eb, 0);
>> + ret = csum_tree_block(eb, result);
>> + if (WARN_ON(ret))
>> + return ret;
>
> You are not handling the case where csum-tree_block returns a positive
> number. It should be translated to a negative value.
Correct, my bad.
But then regarding -EINVAL vs. -EUNCLEAN. In btree_csum_one_bio() the
return of csum_dirty_buffer() gets fed into errno_to_blk_status(), which
translates the errno into the block layer's blk_status_t values. As
neither EINVAL nor EUCLEAN are in the translation list, both would just
be translated to the default BLK_STS_IOERR which is the equivalent of EIO.
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
prev parent reply other threads:[~2019-02-19 12:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 10:58 [PATCH v2] btrfs: factor our read/write stage off csum_tree_block() into its callers Johannes Thumshirn
2019-02-19 12:00 ` Nikolay Borisov
2019-02-19 12:15 ` Johannes Thumshirn [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=4022a4b0-abc0-c44f-2254-399f80f34d38@suse.de \
--to=jthumshirn@suse.de \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=wqu@suse.com \
/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).