aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorDouglas Fuller <dfuller@redhat.com>2015-07-17 16:18:07 -0400
committerIlya Dryomov <idryomov@gmail.com>2016-08-24 17:49:15 -0400
commita4ed38d7a180f184a6e7aedd09db9ca4b1e6a71c (patch)
tree2794a755d3c96ad7b0b88390a4a25f18e0c6e138 /include/linux/ceph
parentf01d5cb24ea92494f9e093e6ee411364a686be99 (diff)
libceph: support for CEPH_OSD_OP_LIST_WATCHERS
Add support for this Ceph OSD op, needed to support the RBD exclusive lock feature. Signed-off-by: Douglas Fuller <dfuller@redhat.com> [idryomov@gmail.com: refactor, misc fixes throughout] Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osd_client.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 858932304260..19821a191732 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -121,6 +121,9 @@ struct ceph_osd_req_op {
121 struct ceph_osd_data response_data; 121 struct ceph_osd_data response_data;
122 } notify; 122 } notify;
123 struct { 123 struct {
124 struct ceph_osd_data response_data;
125 } list_watchers;
126 struct {
124 u64 expected_object_size; 127 u64 expected_object_size;
125 u64 expected_write_size; 128 u64 expected_write_size;
126 } alloc_hint; 129 } alloc_hint;
@@ -249,6 +252,12 @@ struct ceph_osd_linger_request {
249 size_t *preply_len; 252 size_t *preply_len;
250}; 253};
251 254
255struct ceph_watch_item {
256 struct ceph_entity_name name;
257 u64 cookie;
258 struct ceph_entity_addr addr;
259};
260
252struct ceph_osd_client { 261struct ceph_osd_client {
253 struct ceph_client *client; 262 struct ceph_client *client;
254 263
@@ -346,7 +355,6 @@ extern void osd_req_op_cls_response_data_pages(struct ceph_osd_request *,
346 struct page **pages, u64 length, 355 struct page **pages, u64 length,
347 u32 alignment, bool pages_from_pool, 356 u32 alignment, bool pages_from_pool,
348 bool own_pages); 357 bool own_pages);
349
350extern void osd_req_op_cls_init(struct ceph_osd_request *osd_req, 358extern void osd_req_op_cls_init(struct ceph_osd_request *osd_req,
351 unsigned int which, u16 opcode, 359 unsigned int which, u16 opcode,
352 const char *class, const char *method); 360 const char *class, const char *method);
@@ -434,5 +442,10 @@ int ceph_osdc_notify(struct ceph_osd_client *osdc,
434 size_t *preply_len); 442 size_t *preply_len);
435int ceph_osdc_watch_check(struct ceph_osd_client *osdc, 443int ceph_osdc_watch_check(struct ceph_osd_client *osdc,
436 struct ceph_osd_linger_request *lreq); 444 struct ceph_osd_linger_request *lreq);
445int ceph_osdc_list_watchers(struct ceph_osd_client *osdc,
446 struct ceph_object_id *oid,
447 struct ceph_object_locator *oloc,
448 struct ceph_watch_item **watchers,
449 u32 *num_watchers);
437#endif 450#endif
438 451