Re: [PATCH 3/3] target: use vfs_bvec_read/write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux