summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-04-11 12:56:51 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-04-21 09:50:08 +0200
commitafdc1a780ef84a54b613dae6f971407748aab61c (patch)
tree67f120001c9a0a3f95fbb3ee2dc545f0886440c0 /include/linux/blkdev.h
parentc5dec1c3034f1ae3503efbf641ff3b0273b64797 (diff)
downloadlwn-afdc1a780ef84a54b613dae6f971407748aab61c.tar.gz
lwn-afdc1a780ef84a54b613dae6f971407748aab61c.zip
block: add bio_copy_user_iov support to blk_rq_map_user_iov
With this patch, blk_rq_map_user_iov uses bio_copy_user_iov when a low level driver needs padding or a buffer in sg_iovec isn't aligned. That is, it uses temporary kernel buffers instead of mapping user pages directly. When a LLD needs padding, later blk_rq_map_sg needs to extend the last entry of a scatter list. bio_copy_user_iov guarantees that there is enough space for padding by using temporary kernel buffers instead of user pages. blk_rq_map_user_iov needs buffers in sg_iovec to be aligned. The comment in blk_rq_map_user_iov indicates that drivers/scsi/sg.c also needs buffers in sg_iovec to be aligned. Actually, drivers/scsi/sg.c works with unaligned buffers in sg_iovec (it always uses temporary kernel buffers). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Tejun Heo <htejun@gmail.com> Cc: Mike Christie <michaelc@cs.wisc.edu> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
0 files changed, 0 insertions, 0 deletions