[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce806a1a-2101-4bd4-a78c-5027aea9aa13@yukuai.org.cn>
Date: Sat, 30 Aug 2025 12:18:40 +0800
From: Yu Kuai <hailan@...uai.org.cn>
To: Damien Le Moal <dlemoal@...nel.org>, Yu Kuai <yukuai1@...weicloud.com>,
axboe@...nel.dk, tj@...nel.org, josef@...icpanda.com, song@...nel.org,
neil@...wn.name, akpm@...ux-foundation.org, hch@...radead.org,
colyli@...nel.org, hare@...e.de, tieren@...as.com
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, linux-raid@...r.kernel.org, yukuai3@...wei.com,
yi.zhang@...wei.com, yangerkun@...wei.com, johnny.chenyi@...wei.com
Subject: Re: [PATCH RFC v2 04/10] md/raid10: convert read/write to use
bio_submit_split_bioset()
Hi,
在 2025/8/30 8:48, Damien Le Moal 写道:
> On 8/28/25 15:57, Yu Kuai wrote:
>> From: Yu Kuai <yukuai3@...wei.com>
>>
>> On the one hand unify bio split code, prepare to fix disordered split
>> IO; On the other hand fix missing blkcg_bio_issue_init() and
>> trace_block_split() for split IO.
>>
>> Noted discard is not handled, because discard is only splited for
> s/splited/split
>
>> unaligned head and tail, and this can be considered slow path, the
>> disorder here does not matter much.
>>
>> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
>> ---
>> drivers/md/raid10.c | 51 +++++++++++++++++++--------------------------
>> drivers/md/raid10.h | 2 ++
>> 2 files changed, 23 insertions(+), 30 deletions(-)
>>
>> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
>> index b60c30bfb6c7..0e7d2a67fca6 100644
>> --- a/drivers/md/raid10.c
>> +++ b/drivers/md/raid10.c
>> @@ -322,10 +322,12 @@ static void raid_end_bio_io(struct r10bio *r10_bio)
>> struct bio *bio = r10_bio->master_bio;
>> struct r10conf *conf = r10_bio->mddev->private;
>>
>> - if (!test_bit(R10BIO_Uptodate, &r10_bio->state))
>> - bio->bi_status = BLK_STS_IOERR;
>> + if (!test_and_set_bit(R10BIO_Returned, &r10_bio->state)) {
>> + if (!test_bit(R10BIO_Uptodate, &r10_bio->state))
>> + bio->bi_status = BLK_STS_IOERR;
>> + bio_endio(bio);
>> + }
> This change / the R10BIO_Returned flag is not mentioned in the commit message.
> Please explain why it is needed to add for switching to using
> bio_submit_split_bioset(), which in itself should not introduce functional
> changes. Looks like this needs to be split into different patches...
>
Ok, this is actually refered from raid1 flag, I can make this flag a seperate
patch :)
Thanks,
Kuai
Powered by blists - more mailing lists