On Wed, Nov 23, 2016 at 01:08:38PM +1100, NeilBrown wrote: > For raid1/raid10 we could do a very similar thing. There is an > awkwardness in raid1 w.r.t waiting for bi_phys_segments to reach 1, but > that might disappear if Coly's resync changes go through. > Alternately it might make sense to use bio_split so there is one r1_bio > per bio. > I might try the raid10 version and see what it looks like. For RAID1 reads there already is one r1_bio per bio - in fact I have a hack that doesn't allocate a r1_bio at all, but that one currently does not handle reads from degraded arrays at all. Due you remember why we only mark a leg fail for a given bio instead of on a per-device or at least per sector-range? For writes it would make sense to allocate the new bio for each mirror using a bio_set with front_pad for raid1-specific data, but I haven't really looked into the details yet. -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html