From: John Garry <john.g.garry@oracle.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
kernel test robot <lkp@intel.com>,
Johannes Thumshirn <jth@kernel.org>
Cc: "oe-kbuild-all@lists.linux.dev" <oe-kbuild-all@lists.linux.dev>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"song@kernel.org" <song@kernel.org>,
"yukuai3@huawei.com" <yukuai3@huawei.com>, hch <hch@lst.de>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"hare@suse.de" <hare@suse.de>
Subject: Re: [PATCH] btrfs: handle bio_split() error
Date: Wed, 30 Oct 2024 14:20:20 +0000 [thread overview]
Message-ID: <92ea9e18-6174-4619-84a1-2c55a1e86693@oracle.com> (raw)
In-Reply-To: <c9936883-d766-41f5-9a54-35702585ff6a@wdc.com>
On 30/10/2024 14:06, Johannes Thumshirn wrote:
>>>> ret @@ got long @@
> Yep that definitively needs to be:
>
> diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
> index 96cacd5c03a5..847af28ecff9 100644
> --- a/fs/btrfs/bio.c
> +++ b/fs/btrfs/bio.c
> @@ -691,7 +691,7 @@ static bool btrfs_submit_chunk(struct btrfs_bio
> *bbio, int mirror_num)
> if (map_length < length) {
> bbio = btrfs_split_bio(fs_info, bbio, map_length);
> if (IS_ERR(bbio)) {
> - ret = PTR_ERR(bbio);
> + ret = errno_to_blk_status(PTR_ERR(bbio));
> goto fail;
> }
> bio = &bbio->bio;
>
> Can you fold that in John or do you want me to send a new version?
Sure, no problem.
But I would have suggested to not use variable name "ret" for holding a
blk_status_t in original code, especially when it is mixed with
PTR_ERR() usage ...
Thanks,
John
next prev parent reply other threads:[~2024-10-30 14:20 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 15:27 [PATCH v2 0/7] bio_split() error handling rework John Garry
2024-10-28 15:27 ` [PATCH v2 1/7] block: Use BLK_STS_OK in bio_init() John Garry
2024-10-28 16:11 ` Christoph Hellwig
2024-10-28 16:32 ` John Garry
2024-10-28 15:27 ` [PATCH v2 2/7] block: Rework bio_split() return value John Garry
2024-10-28 16:12 ` Christoph Hellwig
2024-10-29 9:12 ` Johannes Thumshirn
2024-10-28 15:27 ` [PATCH v2 3/7] block: Error an attempt to split an atomic write in bio_split() John Garry
2024-10-28 16:12 ` Christoph Hellwig
2024-10-29 9:12 ` Johannes Thumshirn
2024-10-28 15:27 ` [PATCH v2 4/7] block: Handle bio_split() errors in bio_submit_split() John Garry
2024-10-28 16:12 ` Christoph Hellwig
2024-10-29 9:13 ` Johannes Thumshirn
2024-10-28 15:27 ` [PATCH v2 5/7] md/raid0: Handle bio_split() errors John Garry
2024-10-29 3:52 ` Yu Kuai
2024-10-28 15:27 ` [PATCH v2 6/7] md/raid1: " John Garry
2024-10-29 3:48 ` Yu Kuai
2024-10-29 8:45 ` John Garry
2024-10-29 11:30 ` Yu Kuai
2024-10-29 11:36 ` John Garry
2024-10-29 11:32 ` Yu Kuai
2024-10-29 12:12 ` Yu Kuai
2024-10-29 12:21 ` John Garry
2024-10-28 15:27 ` [PATCH v2 7/7] md/raid10: " John Garry
2024-10-29 11:55 ` Yu Kuai
2024-10-29 12:05 ` John Garry
2024-10-29 12:10 ` Yu Kuai
2024-10-29 9:11 ` [PATCH] btrfs: handle bio_split() error Johannes Thumshirn
2024-10-29 10:33 ` John Garry
2024-10-30 14:00 ` kernel test robot
2024-10-30 14:06 ` Johannes Thumshirn
2024-10-30 14:20 ` John Garry [this message]
2024-10-30 14:29 ` Johannes Thumshirn
2024-10-30 20:05 ` Dan Carpenter
2024-10-31 9:29 ` John Garry
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=92ea9e18-6174-4619-84a1-2c55a1e86693@oracle.com \
--to=john.g.garry@oracle.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jth@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=lkp@intel.com \
--cc=martin.petersen@oracle.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=song@kernel.org \
--cc=yukuai3@huawei.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
all inboxes | Powered by JetHome®