From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: convert: Make read_disk_extent() return more meaningful -EIO other -1
Date: Fri, 14 Sep 2018 10:30:03 +0300 [thread overview]
Message-ID: <00482e71-cc8d-dda8-e0df-2e569ddedab1@suse.com> (raw)
In-Reply-To: <20180914072505.15916-2-wqu@suse.com>
On 14.09.2018 10:25, Qu Wenruo wrote:
> When pread64() returns value smaller than expected, it normally means
> EIO, so just return -EIO to replace the intermediate number.
> So when IO fails, we should be able to get more meaningful error number
> of than EPERM.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
> convert/source-fs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/convert/source-fs.c b/convert/source-fs.c
> index b6d08370428a..5660a22cc652 100644
> --- a/convert/source-fs.c
> +++ b/convert/source-fs.c
> @@ -201,7 +201,7 @@ int read_disk_extent(struct btrfs_root *root, u64 bytenr,
> ret = 0;
> fail:
> if (ret > 0)
> - ret = -1;
> + ret = -EIO;
> return ret;
> }
>
>
next prev parent reply other threads:[~2018-09-14 12:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 7:25 [PATCH 0/2] Enhanced error messages for btrfs-convert Qu Wenruo
2018-09-14 7:25 ` [PATCH 1/2] btrfs: convert: Make read_disk_extent() return more meaningful -EIO other -1 Qu Wenruo
2018-09-14 7:30 ` Nikolay Borisov [this message]
2018-09-14 7:25 ` [PATCH 2/2] btrfs-progs: convert: Output meaningful error messages for create_image() Qu Wenruo
2018-09-14 7:36 ` Nikolay Borisov
2018-10-24 15:14 ` [PATCH 0/2] Enhanced error messages for btrfs-convert 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=00482e71-cc8d-dda8-e0df-2e569ddedab1@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--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).