On Thu, Jan 7, 2016 at 6:46 PM, Kent Overstreet <kent.overstreet@xxxxxxxxx> wrote: > On Wed, Jan 06, 2016 at 04:21:17PM +0000, Keith Busch wrote: ... > Yes, splitting in the middle of a bvec is perfectly fine. The reason > bio_for_each_segment takes a struct bvec and not a struct bvec * is because it's > computing what bv_len should be (taking the min of bv_len and bi_size, roughly). > > See include/linux/bio.h: > > bio_for_each_segment() > bio_iter_iovec() > bvec_iter_bvec() > bvec_iter_len() > > which does the actual bv_len computation. Looks my understanding was wrong, and Keith's patch is correct, sorry for the noise. -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html