[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44806c6f-d96a-498c-83e1-e3853ee79d5a@oracle.com>
Date: Mon, 23 Sep 2024 08:44:17 +0100
From: John Garry <john.g.garry@...cle.com>
To: Yu Kuai <yukuai1@...weicloud.com>, axboe@...nel.dk, hch@....de
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, martin.petersen@...cle.com,
"yangerkun@...wei.com" <yangerkun@...wei.com>,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH RFC 5/6] md/raid1: Handle bio_split() errors
On 23/09/2024 07:15, Yu Kuai wrote:
>>>
>>> This way, BLK_STS_IOERR will always be returned, perhaps what you want
>>> is to return the error code from bio_split()?
>>
>> Yeah, I would like to return that error code, so maybe I can encode it
>> in the master_bio directly or pass as an arg to raid_end_bio_io().
>
> That's fine, however, I think the change can introduce problems in some
> corner cases, for example there is a rdev with badblocks and a slow rdev
> with full copy. Currently raid1_read_request() will split this bio to
> read some from fast rdev, and read the badblocks region from slow rdev.
>
> We need a new branch in read_balance() to choose a rdev with full copy.
Sure, I do realize that the mirror'ing personalities need more
sophisticated error handling changes (than what I presented).
However, in raid1_read_request() we do the read_balance() and then the
bio_split() attempt. So what are you suggesting we do for the
bio_split() error? Is it to retry without the bio_split()?
To me bio_split() should not fail. If it does, it is likely ENOMEM or
some other bug being exposed, so I am not sure that retrying with
skipping bio_split() is the right approach (if that is what you are
suggesting).
Thanks,
John
Powered by blists - more mailing lists