]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] block: add sg buffer copy helper functions
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Mon, 17 Mar 2008 15:15:03 +0000 (00:15 +0900)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 7 Apr 2008 17:15:45 +0000 (12:15 -0500)
commit541b0995c87ebc13f6427faddb652238a7770cfb
tree70c6c5944eb978c6eff55eab1e1b1df7049477ec
parent1e08d01229908996aef3ffb3ec512cbbe8633873
[SCSI] block: add sg buffer copy helper functions

This patch adds new three helper functions to copy data between an SG
list and a linear buffer.

- sg_copy_from_buffer copies data from linear buffer to an SG list

- sg_copy_to_buffer copies data from an SG list to a linear buffer

When the APIs copy data from a linear buffer to an SG list,
flush_kernel_dcache_page is called. It's not necessary for everyone
but it's a no-op on most architectures and in general the API is not
used in performance critical path.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
include/linux/scatterlist.h
lib/scatterlist.c