summaryrefslogtreecommitdiff
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-02-14 22:16:43 +0400
committerSage Weil <sage@inktank.com>2013-05-02 08:16:24 +0400
commit2794a82a11cfeae0890741b18b0049ddb55ce646 (patch)
tree9dc71c4a7d95fceed3942418586c5ced230ecdc2 /include/linux/ceph
parent153e5167e0e237faaefb7adf82db5748c1452d73 (diff)
downloadlinux-2794a82a11cfeae0890741b18b0049ddb55ce646.tar.xz
libceph: separate osd request data info
Pull the fields in an osd request structure that define the data for the request out into a separate structure. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osd_client.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 803a9db0b475..600b8278d11e 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -50,6 +50,21 @@ struct ceph_osd {
#define CEPH_OSD_MAX_OP 10
+struct ceph_osd_data {
+ struct {
+ struct {
+ struct page **pages;
+ u32 num_pages;
+ u32 alignment;
+ bool pages_from_pool;
+ bool own_pages;
+ };
+#ifdef CONFIG_BLOCK
+ struct bio *bio;
+#endif /* CONFIG_BLOCK */
+ };
+};
+
/* an in-flight request */
struct ceph_osd_request {
u64 r_tid; /* unique for this client */
@@ -105,15 +120,8 @@ struct ceph_osd_request {
struct ceph_file_layout r_file_layout;
struct ceph_snap_context *r_snapc; /* snap context for writes */
- unsigned r_num_pages; /* size of page array (follows) */
- unsigned r_page_alignment; /* io offset in first page */
- struct page **r_pages; /* pages for data payload */
- int r_pages_from_pool;
- int r_own_pages; /* if true, i own page list */
-#ifdef CONFIG_BLOCK
- struct bio *r_bio; /* instead of pages */
-#endif
+ struct ceph_osd_data r_data;
struct ceph_pagelist r_trail; /* trailing part of the data */
};