On Fri, Jan 23, 2015 at 10:08:01PM +0800, Ming Lei wrote: > > > > for_each_sg(sgl, sg, sgl_nents, i) { > > - iov[i].iov_len = sg->length; > > - iov[i].iov_base = kmap(sg_page(sg)) + sg->offset; > > - } > > + bvec[i].bv_page = sg_page(sg); > > + bvec[i].bv_len = sg->length; > > + bvec[i].bv_offset = sg->offset; > > Sorry, I have one question: I understand one bvec should only cover > one page, but > one sg may cover lots of pages, so could ITER_BVEC handle that correctly? Each scatterlist entry only contains a single page, which is returned by sg_page(sg). The existing code already relies on it because it kmaps that page. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html