diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2005-06-20 08:04:44 -0400 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2005-06-20 08:04:44 -0400 |
commit | df46b9a44ceb5af2ea2351ce8e28ae7bd840b00f (patch) | |
tree | 30ab71759486f94d60af2283fc55bfffcc22155a /include | |
parent | 8b22c249e7de453961e4d253b19fc2a0bdd65d53 (diff) |
[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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bio.h | 2 | ||||
-rw-r--r-- | include/linux/blkdev.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 038022763f09..1dd2bc2e84ae 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -282,6 +282,8 @@ extern int bio_get_nr_vecs(struct block_device *); | |||
282 | extern struct bio *bio_map_user(struct request_queue *, struct block_device *, | 282 | extern struct bio *bio_map_user(struct request_queue *, struct block_device *, |
283 | unsigned long, unsigned int, int); | 283 | unsigned long, unsigned int, int); |
284 | extern void bio_unmap_user(struct bio *); | 284 | extern void bio_unmap_user(struct bio *); |
285 | extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, | ||
286 | unsigned int); | ||
285 | extern void bio_set_pages_dirty(struct bio *bio); | 287 | extern void bio_set_pages_dirty(struct bio *bio); |
286 | extern void bio_check_pages_dirty(struct bio *bio); | 288 | extern void bio_check_pages_dirty(struct bio *bio); |
287 | extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); | 289 | extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4a99b76c5a33..67339bc5f6bc 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -560,6 +560,8 @@ extern void blk_run_queue(request_queue_t *); | |||
560 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); | 560 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); |
561 | extern struct request *blk_rq_map_user(request_queue_t *, int, void __user *, unsigned int); | 561 | extern struct request *blk_rq_map_user(request_queue_t *, int, void __user *, unsigned int); |
562 | extern int blk_rq_unmap_user(struct request *, struct bio *, unsigned int); | 562 | extern int blk_rq_unmap_user(struct request *, struct bio *, unsigned int); |
563 | extern struct request *blk_rq_map_kern(request_queue_t *, int, void *, | ||
564 | unsigned int, unsigned int); | ||
563 | extern int blk_execute_rq(request_queue_t *, struct gendisk *, struct request *); | 565 | extern int blk_execute_rq(request_queue_t *, struct gendisk *, struct request *); |
564 | 566 | ||
565 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) | 567 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) |