block: introduce struct rq_map_data to use reserved pages
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 28 Aug 2008 07:17:06 +0000 (16:17 +0900)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 9 Oct 2008 06:56:10 +0000 (08:56 +0200)
commit152e283fdfea0cd11e297d982378b55937842dde
treea97a57108353f167a1e2911e8ee09c527ef42d3e
parenta3bce90edd8f6cafe3f63b1a943800792e830178
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 <fujita.tomonori@lab.ntt.co.jp>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Douglas Gilbert <dougg@torque.net>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-map.c
block/bsg.c
block/scsi_ioctl.c
drivers/cdrom/cdrom.c
drivers/scsi/scsi_tgt_lib.c
fs/bio.c
include/linux/bio.h
include/linux/blkdev.h