aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlex Elder2013-02-14 12:16:43 -0600
committerSage Weil2013-05-01 21:16:25 -0700
commit2ac2b7a6d4976bd6b5dc0751aa77d12d48d3ac4c (patch)
treeaf95ff579ab1719871e8678ef530db46514c0eb7 /drivers
parent2794a82a11cfeae0890741b18b0049ddb55ce646 (diff)
libceph: distinguish page and bio requests
An osd request uses either pages or a bio list for its data. Use a union to record information about the two, and add a data type tag to select between them. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rbd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 0e814dfda48e..f189bc2909b0 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1425,12 +1425,16 @@ static struct ceph_osd_request *rbd_osd_req_create(
break; /* Nothing to do */
case OBJ_REQUEST_BIO:
rbd_assert(obj_request->bio_list != NULL);
+ osd_req->r_data.type = CEPH_OSD_DATA_TYPE_BIO;
osd_req->r_data.bio = obj_request->bio_list;
break;
case OBJ_REQUEST_PAGES:
+ osd_req->r_data.type = CEPH_OSD_DATA_TYPE_PAGES;
osd_req->r_data.pages = obj_request->pages;
osd_req->r_data.num_pages = obj_request->page_count;
osd_req->r_data.alignment = offset & ~PAGE_MASK;
+ osd_req->r_data.pages_from_pool = false;
+ osd_req->r_data.own_pages = false;
break;
}