mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
block: introduce struct rq_map_data to use reserved pages
This patch introduces struct rq_map_data to enable bio_copy_use_iov() use reserved pages. Currently, bio_copy_user_iov allocates bounce pages but drivers/scsi/sg.c wants to allocate pages by itself and use them. struct rq_map_data can be used to pass allocated pages to bio_copy_user_iov. The current users of bio_copy_user_iov simply passes NULL (they don't want to use pre-allocated pages). Signed-off-by: FUJITA Tomonori <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Douglas Gilbert <[email protected]> Cc: Mike Christie <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
a3bce90edd
commit
152e283fdf
8 changed files with 80 additions and 39 deletions
|
|
@ -362,7 +362,7 @@ static int scsi_map_user_pages(struct scsi_tgt_cmd *tcmd, struct scsi_cmnd *cmd,
|
|||
int err;
|
||||
|
||||
dprintk("%lx %u\n", uaddr, len);
|
||||
err = blk_rq_map_user(q, rq, (void *)uaddr, len, GFP_KERNEL);
|
||||
err = blk_rq_map_user(q, rq, NULL, (void *)uaddr, len, GFP_KERNEL);
|
||||
if (err) {
|
||||
/*
|
||||
* TODO: need to fixup sg_tablesize, max_segment_size,
|
||||
|
|
|
|||
Loading…
Reference in a new issue