Re: [PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-08 Thread Akinobu Mita
2013/6/6 Imre Deak imre.d...@intel.com: Looks ok to me, perhaps adding the seek functionality to the mapping iterator would make things more generic and the mapping iterator more resemble the page iterator. So we'd have a new sg_miter_start_offset and call it here something like:

Re: [PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-08 Thread Akinobu Mita
2013/6/7 Tejun Heo t...@kernel.org: Hello, On Thu, Jun 06, 2013 at 09:52:56PM +0900, Akinobu Mita wrote: +static bool sg_miter_get_next_page(struct sg_mapping_iter *miter) +{ + if (!miter-__remaining) { + struct scatterlist *sg; + unsigned long pgoffset; + +

[PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-06 Thread Akinobu Mita
The only difference between sg_pcopy_{from,to}_buffer() and sg_copy_{from,to}_buffer() is an additional argument that specifies the number of bytes to skip the SG list before copying. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Tejun Heo t...@kernel.org Cc: Imre Deak

Re: [PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-06 Thread Imre Deak
On Thu, 2013-06-06 at 21:52 +0900, Akinobu Mita wrote: The only difference between sg_pcopy_{from,to}_buffer() and sg_copy_{from,to}_buffer() is an additional argument that specifies the number of bytes to skip the SG list before copying. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com

Re: [PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-06 Thread Tejun Heo
Hello, On Thu, Jun 06, 2013 at 09:52:56PM +0900, Akinobu Mita wrote: +static bool sg_miter_get_next_page(struct sg_mapping_iter *miter) +{ + if (!miter-__remaining) { + struct scatterlist *sg; + unsigned long pgoffset; + + if