On 5/18/21 6:12 PM, Artur Paszkiewicz wrote:
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.
Good point.
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.
Hmm, raid0 allocates split bio from mddev->bio_set, but raid5 is
different, it splits bio from r5conf->bio_split. So either let raid5 also
splits bio from mddev->bio_set, or add an additional checking for
raid5. Thoughts?
Thanks,
Guoqing