md/raid1: convert to use bio_submit_split_bioset()
authorYu Kuai <yukuai3@huawei.com>
Wed, 10 Sep 2025 06:30:48 +0000 (14:30 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Sep 2025 11:23:45 +0000 (05:23 -0600)
commita6fcc160d6fd9b4ddd229e351518daee21eecad7
treebb6121759e8c228f836a0f34113ccfaa9669a36c
parent5b38ee5a4a12cfdefd848f7ec09da3e9007ad55f
md/raid1: convert to use bio_submit_split_bioset()

Unify bio split code, and prepare to fix ordering of split IO.

Noted that bio_submit_split_bioset() can fail the original bio directly
by split error, set R1BIO_Returned in this case to notify raid_end_bio_io()
that the original bio is returned already.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/raid1.c
drivers/md/raid1.h