From: Radoslaw Zarzynski Date: Fri, 29 Nov 2019 18:16:48 +0000 (+0100) Subject: osd: unify connected() and is_connected() of Watch. X-Git-Tag: v15.1.1~415^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=86e6a1b98230b758053843995c2552b931cbe947;p=ceph.git osd: unify connected() and is_connected() of Watch. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/osd/Watch.cc b/src/osd/Watch.cc index 4e13887e7ba3..28d24d976eaf 100644 --- a/src/osd/Watch.cc +++ b/src/osd/Watch.cc @@ -308,8 +308,6 @@ Watch::~Watch() { ceph_assert(!conn); } -bool Watch::connected() { return !!conn; } - Context *Watch::get_delayed_cb() { ceph_assert(!cb); @@ -460,7 +458,7 @@ void Watch::start_notify(NotifyRef notif) dout(10) << "start_notify " << notif->notify_id << dendl; in_progress_notifies[notif->notify_id] = notif; notif->start_watcher(self.lock()); - if (connected()) + if (is_connected()) send_notify(notif); } diff --git a/src/osd/Watch.h b/src/osd/Watch.h index 3d3b09fd7722..8d6d93a7d1c7 100644 --- a/src/osd/Watch.h +++ b/src/osd/Watch.h @@ -192,6 +192,7 @@ public: return last_ping; } + /// True if currently connected bool is_connected() const { return conn.get() != NULL; } @@ -227,9 +228,6 @@ public: /// Generates context for use if watch timeout is delayed by scrub or recovery Context *get_delayed_cb(); - /// True if currently connected - bool connected(); - /// Transitions Watch to connected, unregister_cb, resends pending Notifies void connect( ConnectionRef con, ///< [in] Reference to new connection