diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2005-11-11 05:30:27 -0600 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-14 19:03:35 -0800 |
commit | 6e68af666f5336254b5715dca591026b7324499a (patch) | |
tree | 5640209b6e2b75659149460f14531cfecffe2f5d /include | |
parent | 6e39b69e7ea9205c5f80aeac3ef999ab8fb1a4cc (diff) | |
download | linux-3.10-6e68af666f5336254b5715dca591026b7324499a.tar.gz linux-3.10-6e68af666f5336254b5715dca591026b7324499a.tar.bz2 linux-3.10-6e68af666f5336254b5715dca591026b7324499a.zip |
[SCSI] Convert SCSI mid-layer to scsi_execute_async
Add scsi helpers to create really-large-requests and convert
scsi-ml to scsi_execute_async().
Per Jens's previous comments, I placed this function in scsi_lib.c.
I made it follow all the queue's limits - I think I did at least :), so
I removed the warning on the function header.
I think the scsi_execute_* functions should eventually take a request_queue
and be placed some place where the dm-multipath hw_handler can use them
if that failover code is going to stay in the kernel. That conversion
patch will be sent in another mail though.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bio.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_device.h | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 685fd3720df..b60ffe32cd2 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -292,6 +292,8 @@ extern struct bio *bio_clone(struct bio *, gfp_t); extern void bio_init(struct bio *); extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int); +extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *, + unsigned int, unsigned int); extern int bio_get_nr_vecs(struct block_device *); extern struct bio *bio_map_user(struct request_queue *, struct block_device *, unsigned long, unsigned int, int); diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 063e32fe036..e94ca4d3603 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -274,6 +274,12 @@ extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, int data_direction, void *buffer, unsigned bufflen, struct scsi_sense_hdr *, int timeout, int retries); +extern int scsi_execute_async(struct scsi_device *sdev, + const unsigned char *cmd, int data_direction, + void *buffer, unsigned bufflen, int use_sg, + int timeout, int retries, void *privdata, + void (*done)(void *, char *, int, int), + gfp_t gfp); static inline unsigned int sdev_channel(struct scsi_device *sdev) { |