summaryrefslogtreecommitdiffstats
path: root/include/linux/ceph/osd_client.h
diff options
context:
space:
mode:
authorAlex Elder2013-02-14 19:16:43 +0100
committerSage Weil2013-05-02 06:16:25 +0200
commit2ac2b7a6d4976bd6b5dc0751aa77d12d48d3ac4c (patch)
treeaf95ff579ab1719871e8678ef530db46514c0eb7 /include/linux/ceph/osd_client.h
parentlibceph: separate osd request data info (diff)
downloadkernel-qcow2-linux-2ac2b7a6d4976bd6b5dc0751aa77d12d48d3ac4c.tar.gz
kernel-qcow2-linux-2ac2b7a6d4976bd6b5dc0751aa77d12d48d3ac4c.tar.xz
kernel-qcow2-linux-2ac2b7a6d4976bd6b5dc0751aa77d12d48d3ac4c.zip
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 'include/linux/ceph/osd_client.h')
-rw-r--r--include/linux/ceph/osd_client.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 600b8278d11e..56604b33dc3c 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -50,8 +50,17 @@ struct ceph_osd {
#define CEPH_OSD_MAX_OP 10
+enum ceph_osd_data_type {
+ CEPH_OSD_DATA_TYPE_NONE,
+ CEPH_OSD_DATA_TYPE_PAGES,
+#ifdef CONFIG_BLOCK
+ CEPH_OSD_DATA_TYPE_BIO,
+#endif /* CONFIG_BLOCK */
+};
+
struct ceph_osd_data {
- struct {
+ enum ceph_osd_data_type type;
+ union {
struct {
struct page **pages;
u32 num_pages;