aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-12-18 00:49:37 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-01-02 12:10:08 -0500
commit56c451f4b583ccdf80c9e676179c9cb49de86745 (patch)
tree7ad9daeafb88e3c4390bf7a2db0c203fe2642728 /drivers/scsi/sg.c
parente623ddb4e940b266adc77ba1cc28a3554aa90e79 (diff)
[SCSI] block: fix the partial mappings with struct rq_map_data
This fixes bio_copy_user_iov to properly handle the partial mappings with struct rq_map_data (which only sg uses for now but st and osst will shortly). It adds the offset member to struct rq_map_data and changes blk_rq_map_user to update it so that bio_copy_user_iov can add an appropriate page frame via bio_add_pc_page(). 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>
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r--drivers/scsi/sg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 5103855242ae..7d0b3d9ee43b 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1669,6 +1669,7 @@ static int sg_start_req(Sg_request *srp, unsigned char *cmd)
1669 md->pages = req_schp->pages; 1669 md->pages = req_schp->pages;
1670 md->page_order = req_schp->page_order; 1670 md->page_order = req_schp->page_order;
1671 md->nr_entries = req_schp->k_use_sg; 1671 md->nr_entries = req_schp->k_use_sg;
1672 md->offset = 0;
1672 } 1673 }
1673 1674
1674 if (iov_count) 1675 if (iov_count)