]> err.no Git - linux-2.6/commitdiff
bio: fix bio_copy_kern() handling of bio->bv_len
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Mon, 25 Aug 2008 18:36:08 +0000 (20:36 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 27 Aug 2008 07:50:19 +0000 (09:50 +0200)
The commit 68154e90c9d1492d570671ae181d9a8f8530da55 introduced
bio_copy_kern() to add bounce support to blk_rq_map_kern.

bio_copy_kern() uses bio->bv_len to copy data for READ commands after
the completion but it doesn't work with a request that partially
completed. SCSI always completes a PC request as a whole but seems
some don't.

This patch fixes bio_copy_kern to handle the above case. As
bio_copy_user does, bio_copy_kern uses struct bio_map_data to store
struct bio_vec.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reported-by: Nix <nix@esperi.org.uk>
Tested-by: Nix <nix@esperi.org.uk>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

No differences found