aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/osd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/osd')
-rw-r--r--drivers/scsi/osd/osd_initiator.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
index 15f0bbc19c9c..c98153bfb36d 100644
--- a/drivers/scsi/osd/osd_initiator.c
+++ b/drivers/scsi/osd/osd_initiator.c
@@ -789,6 +789,20 @@ void osd_req_write(struct osd_request *or,
789} 789}
790EXPORT_SYMBOL(osd_req_write); 790EXPORT_SYMBOL(osd_req_write);
791 791
792int osd_req_write_kern(struct osd_request *or,
793 const struct osd_obj_id *obj, u64 offset, void* buff, u64 len)
794{
795 struct request_queue *req_q = or->osd_dev->scsi_device->request_queue;
796 struct bio *bio = bio_map_kern(req_q, buff, len, GFP_KERNEL);
797
798 if (IS_ERR(bio))
799 return PTR_ERR(bio);
800
801 osd_req_write(or, obj, bio, offset);
802 return 0;
803}
804EXPORT_SYMBOL(osd_req_write_kern);
805
792/*TODO: void osd_req_append(struct osd_request *, 806/*TODO: void osd_req_append(struct osd_request *,
793 const struct osd_obj_id *, struct bio *data_out); */ 807 const struct osd_obj_id *, struct bio *data_out); */
794/*TODO: void osd_req_create_write(struct osd_request *, 808/*TODO: void osd_req_create_write(struct osd_request *,
@@ -824,6 +838,20 @@ void osd_req_read(struct osd_request *or,
824} 838}
825EXPORT_SYMBOL(osd_req_read); 839EXPORT_SYMBOL(osd_req_read);
826 840
841int osd_req_read_kern(struct osd_request *or,
842 const struct osd_obj_id *obj, u64 offset, void* buff, u64 len)
843{
844 struct request_queue *req_q = or->osd_dev->scsi_device->request_queue;
845 struct bio *bio = bio_map_kern(req_q, buff, len, GFP_KERNEL);
846
847 if (IS_ERR(bio))
848 return PTR_ERR(bio);
849
850 osd_req_read(or, obj, bio, offset);
851 return 0;
852}
853EXPORT_SYMBOL(osd_req_read_kern);
854
827void osd_req_get_attributes(struct osd_request *or, 855void osd_req_get_attributes(struct osd_request *or,
828 const struct osd_obj_id *obj) 856 const struct osd_obj_id *obj)
829{ 857{