[PATCH for-4.4] block: split bios to max possible length

Ming Lei tom.leiming at gmail.com
Sat Jan 9 03:10:38 PST 2016


On Thu, Jan 7, 2016 at 6:46 PM, Kent Overstreet
<kent.overstreet at gmail.com> 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



More information about the Linux-nvme mailing list