summaryrefslogtreecommitdiff
path: root/include/linux/ceph/osd_client.h
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-02-11 12:33:24 -0600
committerSage Weil <sage@inktank.com>2013-05-01 21:19:00 -0700
commit49719778bfa5371ec9b5a7d989bb29000e3ac5df (patch)
tree89e02e651d419c04b18bc8eb419576f0132769b4 /include/linux/ceph/osd_client.h
parent863c7eb590c154c7c2cfac40914f5bedcad1a166 (diff)
downloadlwn-49719778bfa5371ec9b5a7d989bb29000e3ac5df.tar.gz
lwn-49719778bfa5371ec9b5a7d989bb29000e3ac5df.zip
libceph: support raw data requests
Allow osd request ops that aren't otherwise structured (not class, extent, or watch ops) to specify "raw" data to be used to hold incoming data for the op. Make use of this capability for the osd STAT op. Prefix the name of the private function osd_req_op_init() with "_", and expose a new function by that (earlier) name whose purpose is to initialize osd ops with (only) implied data. For now we'll just support the use of a page array for an osd op with incoming raw data. 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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 0e406934a551..4d84a2b44f18 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -84,6 +84,7 @@ struct ceph_osd_req_op {
u16 op; /* CEPH_OSD_OP_* */
u32 payload_len;
union {
+ struct ceph_osd_data raw_data_in;
struct {
u64 offset, length;
u64 truncate_size;
@@ -232,6 +233,15 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc,
extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc,
struct ceph_msg *msg);
+extern void osd_req_op_init(struct ceph_osd_request *osd_req,
+ unsigned int which, u16 opcode);
+
+extern void osd_req_op_raw_data_in_pages(struct ceph_osd_request *,
+ unsigned int which,
+ struct page **pages, u64 length,
+ u32 alignment, bool pages_from_pool,
+ bool own_pages);
+
extern void osd_req_op_extent_init(struct ceph_osd_request *osd_req,
unsigned int which, u16 opcode,
u64 offset, u64 length,