]> err.no Git - linux-2.6/commitdiff
block: add bounce support to blk_rq_map_user_iov
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 26 Jun 2008 17:39:23 +0000 (19:39 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 3 Jul 2008 11:21:14 +0000 (13:21 +0200)
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>
block/blk-map.c

index 0b1af5a3537ca0728407c8acfedfaba44338cd19..813011ef8276e8e2f7c7858a5d70eeb86255574a 100644 (file)
@@ -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;