> + struct bio *mbio = NULL; > + int offset; > if (!r1_bio->bios[i]) > continue; > > - mbio = bio_clone_mddev(bio, GFP_NOIO, mddev); > - bio_trim(mbio, r1_bio->sector - bio->bi_iter.bi_sector, > - max_sectors); > + offset = r1_bio->sector - bio->bi_iter.bi_sector; I think offset should be a sector_t. Otherwise this looks fine: Reviewed-by: Christoph Hellwig <hch@xxxxxx>