On 18.05.2021 07:32, Guoqing Jiang wrote:
+ /*
+ * We don't clone bio for multipath, raid1 and raid10 since we can reuse
+ * their clone infrastructure.
+ */
+ if (blk_queue_io_stat(bio->bi_bdev->bd_disk->queue) &&
+ (bio->bi_pool != &mddev->md_io_bs) &&
+ (mddev->level != 1) && (mddev->level != 10) &&
+ (mddev->level != LEVEL_MULTIPATH)) {
Maybe add a flag to struct md_personality and check it here? Something
that will be set only for the personalities which clone the bio
themselves.
Doesn't this need to check the bio->bi_pool also against mddev->bio_set
to skip the bios split by md? Similarly to the check against
bio_chain_endio which you did before.
Thanks,
Artur