summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-04-28 16:07:27 +0200
committerIlya Dryomov <idryomov@gmail.com>2016-05-26 01:15:28 +0200
commit1907920324f1f3ebb6618344417c03a2863bba01 (patch)
tree537d0a98db34205484f05337c25f51b9128987dd /include/linux
parent922dab6134178cae317ae00de86376cba59f3147 (diff)
libceph: support for sending notifies
Implement ceph_osdc_notify() for sending notifies. Due to the fact that the current messenger can't do read-in into pagelists (it can only do write-out from them), I had to go with a page vector for a NOTIFY_COMPLETE payload, for now. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ceph/osd_client.h20
-rw-r--r--include/linux/ceph/rados.h3
2 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index cd2dcb8939de..63054fae4f15 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -115,6 +115,11 @@ struct ceph_osd_req_op {
struct ceph_osd_data request_data;
} notify_ack;
struct {
+ u64 cookie;
+ struct ceph_osd_data request_data;
+ struct ceph_osd_data response_data;
+ } notify;
+ struct {
u64 expected_object_size;
u64 expected_write_size;
} alloc_hint;
@@ -202,6 +207,7 @@ struct ceph_osd_linger_request {
struct ceph_osd_client *osdc;
u64 linger_id;
bool committed;
+ bool is_watch; /* watch or notify */
struct ceph_osd *osd;
struct ceph_osd_request *reg_req;
@@ -220,14 +226,20 @@ struct ceph_osd_linger_request {
struct list_head scan_item;
struct completion reg_commit_wait;
+ struct completion notify_finish_wait;
int reg_commit_error;
+ int notify_finish_error;
int last_error;
u32 register_gen;
+ u64 notify_id;
rados_watchcb2_t wcb;
rados_watcherrcb_t errcb;
void *data;
+
+ struct page ***preply_pages;
+ size_t *preply_len;
};
struct ceph_osd_client {
@@ -397,5 +409,13 @@ int ceph_osdc_notify_ack(struct ceph_osd_client *osdc,
u64 cookie,
void *payload,
size_t payload_len);
+int ceph_osdc_notify(struct ceph_osd_client *osdc,
+ struct ceph_object_id *oid,
+ struct ceph_object_locator *oloc,
+ void *payload,
+ size_t payload_len,
+ u32 timeout,
+ struct page ***preply_pages,
+ size_t *preply_len);
#endif
diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h
index 204c8c944703..5c0da61cb763 100644
--- a/include/linux/ceph/rados.h
+++ b/include/linux/ceph/rados.h
@@ -477,6 +477,9 @@ struct ceph_osd_op {
__le32 gen; /* registration generation */
} __attribute__ ((packed)) watch;
struct {
+ __le64 cookie;
+ } __attribute__ ((packed)) notify;
+ struct {
__le64 offset, length;
__le64 src_offset;
} __attribute__ ((packed)) clonerange;