[SCSI] libosd: osd_req_{read,write}_kern new API

By popular demand, define usefull wrappers for osd_req_read/write
that recieve kernel pointers. All users had their own.

Also remove these from exofs

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Boaz Harrosh
2009-05-24 20:02:22 +03:00
committed by James Bottomley
parent de6b20385b
commit 0e35afbc8b
4 changed files with 32 additions and 32 deletions

View File

@@ -125,29 +125,3 @@ int extract_attr_from_req(struct osd_request *or, struct osd_attr *attr)
return -EIO;
}
int osd_req_read_kern(struct osd_request *or,
const struct osd_obj_id *obj, u64 offset, void* buff, u64 len)
{
struct request_queue *req_q = or->osd_dev->scsi_device->request_queue;
struct bio *bio = bio_map_kern(req_q, buff, len, GFP_KERNEL);
if (!bio)
return -ENOMEM;
osd_req_read(or, obj, bio, offset);
return 0;
}
int osd_req_write_kern(struct osd_request *or,
const struct osd_obj_id *obj, u64 offset, void* buff, u64 len)
{
struct request_queue *req_q = or->osd_dev->scsi_device->request_queue;
struct bio *bio = bio_map_kern(req_q, buff, len, GFP_KERNEL);
if (!bio)
return -ENOMEM;
osd_req_write(or, obj, bio, offset);
return 0;
}