[PATCH] Add blk_rq_map_kern()

Add blk_rq_map_kern which takes a kernel buffer and maps it into
a request and bio. This can be used by the dm hw_handlers, old
sg_scsi_ioctl, and one day scsi special requests so all requests
comming into scsi will have bios. All requests having bios
should allow scsi to use scatter lists for all IO and allow it
to use block layer functions.

Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
Mike Christie
2005-06-20 14:04:44 +02:00
committed by Jens Axboe
parent 8b22c249e7
commit df46b9a44c
4 changed files with 126 additions and 0 deletions

View File

@@ -560,6 +560,8 @@ extern void blk_run_queue(request_queue_t *);
extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *);
extern struct request *blk_rq_map_user(request_queue_t *, int, void __user *, unsigned int);
extern int blk_rq_unmap_user(struct request *, struct bio *, unsigned int);
extern struct request *blk_rq_map_kern(request_queue_t *, int, void *,
unsigned int, unsigned int);
extern int blk_execute_rq(request_queue_t *, struct gendisk *, struct request *);
static inline request_queue_t *bdev_get_queue(struct block_device *bdev)