diff options
Diffstat (limited to 'include/scsi/osd_initiator.h')
-rw-r--r-- | include/scsi/osd_initiator.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h index b24d9616eb46..02bd9f716357 100644 --- a/include/scsi/osd_initiator.h +++ b/include/scsi/osd_initiator.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "osd_types.h" | 18 | #include "osd_types.h" |
19 | 19 | ||
20 | #include <linux/blkdev.h> | 20 | #include <linux/blkdev.h> |
21 | #include <scsi/scsi_device.h> | ||
21 | 22 | ||
22 | /* Note: "NI" in comments below means "Not Implemented yet" */ | 23 | /* Note: "NI" in comments below means "Not Implemented yet" */ |
23 | 24 | ||
@@ -47,6 +48,7 @@ enum osd_std_version { | |||
47 | */ | 48 | */ |
48 | struct osd_dev { | 49 | struct osd_dev { |
49 | struct scsi_device *scsi_device; | 50 | struct scsi_device *scsi_device; |
51 | struct file *file; | ||
50 | unsigned def_timeout; | 52 | unsigned def_timeout; |
51 | 53 | ||
52 | #ifdef OSD_VER1_SUPPORT | 54 | #ifdef OSD_VER1_SUPPORT |
@@ -69,6 +71,10 @@ void osd_dev_fini(struct osd_dev *od); | |||
69 | 71 | ||
70 | /* some hi level device operations */ | 72 | /* some hi level device operations */ |
71 | int osd_auto_detect_ver(struct osd_dev *od, void *caps); /* GFP_KERNEL */ | 73 | int osd_auto_detect_ver(struct osd_dev *od, void *caps); /* GFP_KERNEL */ |
74 | static inline struct request_queue *osd_request_queue(struct osd_dev *od) | ||
75 | { | ||
76 | return od->scsi_device->request_queue; | ||
77 | } | ||
72 | 78 | ||
73 | /* we might want to use function vector in the future */ | 79 | /* we might want to use function vector in the future */ |
74 | static inline void osd_dev_set_ver(struct osd_dev *od, enum osd_std_version v) | 80 | static inline void osd_dev_set_ver(struct osd_dev *od, enum osd_std_version v) |
@@ -363,7 +369,9 @@ void osd_req_create_object(struct osd_request *or, struct osd_obj_id *); | |||
363 | void osd_req_remove_object(struct osd_request *or, struct osd_obj_id *); | 369 | void osd_req_remove_object(struct osd_request *or, struct osd_obj_id *); |
364 | 370 | ||
365 | void osd_req_write(struct osd_request *or, | 371 | void osd_req_write(struct osd_request *or, |
366 | const struct osd_obj_id *, struct bio *data_out, u64 offset); | 372 | const struct osd_obj_id *obj, u64 offset, struct bio *bio, u64 len); |
373 | int osd_req_write_kern(struct osd_request *or, | ||
374 | const struct osd_obj_id *obj, u64 offset, void *buff, u64 len); | ||
367 | void osd_req_append(struct osd_request *or, | 375 | void osd_req_append(struct osd_request *or, |
368 | const struct osd_obj_id *, struct bio *data_out);/* NI */ | 376 | const struct osd_obj_id *, struct bio *data_out);/* NI */ |
369 | void osd_req_create_write(struct osd_request *or, | 377 | void osd_req_create_write(struct osd_request *or, |
@@ -378,7 +386,9 @@ void osd_req_flush_object(struct osd_request *or, | |||
378 | /*V2*/ u64 offset, /*V2*/ u64 len); | 386 | /*V2*/ u64 offset, /*V2*/ u64 len); |
379 | 387 | ||
380 | void osd_req_read(struct osd_request *or, | 388 | void osd_req_read(struct osd_request *or, |
381 | const struct osd_obj_id *, struct bio *data_in, u64 offset); | 389 | const struct osd_obj_id *obj, u64 offset, struct bio *bio, u64 len); |
390 | int osd_req_read_kern(struct osd_request *or, | ||
391 | const struct osd_obj_id *obj, u64 offset, void *buff, u64 len); | ||
382 | 392 | ||
383 | /* | 393 | /* |
384 | * Root/Partition/Collection/Object Attributes commands | 394 | * Root/Partition/Collection/Object Attributes commands |