aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-04-28 10:07:24 -0400
committerIlya Dryomov <idryomov@gmail.com>2016-05-25 18:36:28 -0400
commitfe5da05e979830b43b115d8a18ead521d507c783 (patch)
tree6afb8cacfd090d9d3b46a0a9976930957bb2e6cf /include/linux/ceph
parent85e084feb47349d62989efe1713a8723af95f4ea (diff)
libceph: redo callbacks and factor out MOSDOpReply decoding
If you specify ACK | ONDISK and set ->r_unsafe_callback, both ->r_callback and ->r_unsafe_callback(true) are called on ack. This is very confusing. Redo this so that only one of them is called: ->r_unsafe_callback(true), on ack ->r_unsafe_callback(false), on commit or ->r_callback, on ack|commit Decode everything in decode_MOSDOpReply() to reduce clutter. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osd_client.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 3bebd60e7f9f..2415dc0cb008 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -162,13 +162,14 @@ struct ceph_osd_request {
162 unsigned int r_num_ops; 162 unsigned int r_num_ops;
163 163
164 int r_result; 164 int r_result;
165 int r_got_reply; 165 bool r_got_reply;
166 int r_linger; 166 int r_linger;
167 167
168 struct ceph_osd_client *r_osdc; 168 struct ceph_osd_client *r_osdc;
169 struct kref r_kref; 169 struct kref r_kref;
170 bool r_mempool; 170 bool r_mempool;
171 struct completion r_completion, r_safe_completion; 171 struct completion r_completion;
172 struct completion r_safe_completion; /* fsync waiter */
172 ceph_osdc_callback_t r_callback; 173 ceph_osdc_callback_t r_callback;
173 ceph_osdc_unsafe_callback_t r_unsafe_callback; 174 ceph_osdc_unsafe_callback_t r_unsafe_callback;
174 struct list_head r_unsafe_item; 175 struct list_head r_unsafe_item;