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