diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-04-28 16:07:27 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-26 01:15:28 +0200 |
commit | 1907920324f1f3ebb6618344417c03a2863bba01 (patch) | |
tree | 537d0a98db34205484f05337c25f51b9128987dd /include/linux/ceph/osd_client.h | |
parent | 922dab6134178cae317ae00de86376cba59f3147 (diff) | |
download | talos-obmc-linux-1907920324f1f3ebb6618344417c03a2863bba01.tar.gz talos-obmc-linux-1907920324f1f3ebb6618344417c03a2863bba01.zip |
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/ceph/osd_client.h')
-rw-r--r-- | include/linux/ceph/osd_client.h | 20 |
1 files changed, 20 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 |