Skip to content

Commit

Permalink
block: add bounce support to blk_rq_map_user_iov
Browse files Browse the repository at this point in the history
blk_rq_map_user_iov can't handle the bounce buffer (it means that the
bio_map_user_iov path doesn't work with a LLD that needs GFP_DMA).

This patch fixes blk_rq_map_user_iov to support the bounce buffer.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
fujita authored and Jens Axboe committed Jul 3, 2008
1 parent c265a7f commit 07359fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/blk-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
if (!bio_flagged(bio, BIO_USER_MAPPED))
rq->cmd_flags |= REQ_COPY_USER;

blk_queue_bounce(q, &bio);
bio_get(bio);
blk_rq_bio_prep(q, rq, bio);
rq->buffer = rq->data = NULL;
Expand Down

0 comments on commit 07359fc

Please sign in to comment.