[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5417dfdd-f558-2d5e-43b1-043c6bd30041@huaweicloud.com>
Date: Mon, 1 Sep 2025 10:40:49 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Yu Kuai <hailan@...uai.org.cn>, 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, yi.zhang@...wei.com,
yangerkun@...wei.com, johnny.chenyi@...wei.com,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH RFC v2 09/10] block: fix disordered IO in the case
recursive split
Hi,
在 2025/08/30 12:28, Yu Kuai 写道:
>>> @@ -745,12 +745,16 @@ void submit_bio_noacct_nocheck(struct bio *bio)
>>> * to collect a list of requests submited by a ->submit_bio
>>> method while
>>> * it is active, and then process them after it returned.
>>> */
>>> - if (current->bio_list)
>>> - bio_list_add(¤t->bio_list[0], bio);
>>> - else if (!bdev_test_flag(bio->bi_bdev, BD_HAS_SUBMIT_BIO))
>>> + if (current->bio_list) {
>>> + if (split)
>>> + bio_list_add_head(¤t->bio_list[0], bio);
>>> + else
>>> + bio_list_add(¤t->bio_list[0], bio);
>> This really needs a comment clarifying why we do an add at tail
>> instead of
>> keeping the original order with a add at head. I am also scared that
>> this may
>> break sequential write ordering for zoned devices.
>
> I think add at head is exactly what we do here to keep the orginal order
> for
> the case bio split. Other than split, if caller do generate multiple
> sequential
> bios, we should keep the order by add at tail.
>
> Not sure about zoned devices for now, I'll have a look in details.
For zoned devices, can we somehow trigger this recursive split? I
suspect bio disordered will apear in this case but I don't know for
now and I can't find a way to reporduce it.
Perhaps I can bypass zoned devices for now, and if we really met the
recursive split case and there is a problem, we can fix it later:
if (split && !bdev_is_zoned(bio->bi_bdev))
bio_list_add_head()
Thanks,
Kuai
Powered by blists - more mailing lists