summaryrefslogtreecommitdiffstats
path: root/net/ceph/ceph_strings.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-05-26 01:15:02 +0200
committerIlya Dryomov <idryomov@gmail.com>2016-05-26 01:15:02 +0200
commit922dab6134178cae317ae00de86376cba59f3147 (patch)
treea7047a5950b6a8505cc1e6852e4532656064fede /net/ceph/ceph_strings.c
parentc525f03601f52c83ded046624138f2a45e0ba56c (diff)
downloadblackbird-obmc-linux-922dab6134178cae317ae00de86376cba59f3147.tar.gz
blackbird-obmc-linux-922dab6134178cae317ae00de86376cba59f3147.zip
libceph, rbd: ceph_osd_linger_request, watch/notify v2
This adds support and switches rbd to a new, more reliable version of watch/notify protocol. As with the OSD client update, this is mostly about getting the right structures linked into the right places so that reconnects are properly sent when needed. watch/notify v2 also requires sending regular pings to the OSDs - send_linger_ping(). A major change from the old watch/notify implementation is the introduction of ceph_osd_linger_request - linger requests no longer piggy back on ceph_osd_request. ceph_osd_event has been merged into ceph_osd_linger_request. All the details are now hidden within libceph, the interface consists of a simple pair of watch/unwatch functions and ceph_osdc_notify_ack(). ceph_osdc_watch() does return ceph_osd_linger_request, but only to keep the lifetime management simple. ceph_osdc_notify_ack() accepts an optional data payload, which is relayed back to the notifier. Portions of this patch are loosely based on work by Douglas Fuller <dfuller@redhat.com> and Mike Christie <michaelc@cs.wisc.edu>. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph/ceph_strings.c')
-rw-r--r--net/ceph/ceph_strings.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/ceph/ceph_strings.c b/net/ceph/ceph_strings.c
index 139a9cb19b0c..3773a4fa11e3 100644
--- a/net/ceph/ceph_strings.c
+++ b/net/ceph/ceph_strings.c
@@ -27,6 +27,22 @@ __CEPH_FORALL_OSD_OPS(GENERATE_CASE)
}
}
+const char *ceph_osd_watch_op_name(int o)
+{
+ switch (o) {
+ case CEPH_OSD_WATCH_OP_UNWATCH:
+ return "unwatch";
+ case CEPH_OSD_WATCH_OP_WATCH:
+ return "watch";
+ case CEPH_OSD_WATCH_OP_RECONNECT:
+ return "reconnect";
+ case CEPH_OSD_WATCH_OP_PING:
+ return "ping";
+ default:
+ return "???";
+ }
+}
+
const char *ceph_osd_state_name(int s)
{
switch (s) {
OpenPOWER on IntegriCloud