Re: [PATCH RFC v3 14/15] block: fix disordered IO in the case recursive split

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/31/25 8:32 PM, Yu Kuai wrote:
-void submit_bio_noacct_nocheck(struct bio *bio)
+void submit_bio_noacct_nocheck(struct bio *bio, bool split)
  {
  	blk_cgroup_bio_start(bio);
  	blkcg_bio_issue_init(bio);
@@ -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(&current->bio_list[0], bio);
-	else if (!bdev_test_flag(bio->bi_bdev, BD_HAS_SUBMIT_BIO))
+	if (current->bio_list) {
+		if (split && !bdev_is_zoned(bio->bi_bdev))
+			bio_list_add_head(&current->bio_list[0], bio);
+		else
+			bio_list_add(&current->bio_list[0], bio);

The above change will cause write errors for zoned block devices. As I
have shown before, also for zoned block devices, if a bio is split
insertion must happen at the head of the list. See e.g.
"Re: [PATCH 1/2] block: Make __submit_bio_noacct() preserve the bio submission order"
(https://lore.kernel.org/linux-block/a0c89df8-4b33-409c-ba43-f9543fb1b091@xxxxxxx/)

Thanks,

Bart.




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux