aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-02-11 13:33:24 -0500
committerSage Weil <sage@inktank.com>2013-05-02 00:19:00 -0400
commit49719778bfa5371ec9b5a7d989bb29000e3ac5df (patch)
tree89e02e651d419c04b18bc8eb419576f0132769b4 /include/linux
parent863c7eb590c154c7c2cfac40914f5bedcad1a166 (diff)
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')
-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 {
84 u16 op; /* CEPH_OSD_OP_* */ 84 u16 op; /* CEPH_OSD_OP_* */
85 u32 payload_len; 85 u32 payload_len;
86 union { 86 union {
87 struct ceph_osd_data raw_data_in;
87 struct { 88 struct {
88 u64 offset, length; 89 u64 offset, length;
89 u64 truncate_size; 90 u64 truncate_size;
@@ -232,6 +233,15 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc,
232extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc, 233extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc,
233 struct ceph_msg *msg); 234 struct ceph_msg *msg);
234 235
236extern void osd_req_op_init(struct ceph_osd_request *osd_req,
237 unsigned int which, u16 opcode);
238
239extern void osd_req_op_raw_data_in_pages(struct ceph_osd_request *,
240 unsigned int which,
241 struct page **pages, u64 length,
242 u32 alignment, bool pages_from_pool,
243 bool own_pages);
244
235extern void osd_req_op_extent_init(struct ceph_osd_request *osd_req, 245extern void osd_req_op_extent_init(struct ceph_osd_request *osd_req,
236 unsigned int which, u16 opcode, 246 unsigned int which, u16 opcode,
237 u64 offset, u64 length, 247 u64 offset, u64 length,