]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mon/MonClient.h
update sources to v12.1.0
[ceph.git] / ceph / src / mon / MonClient.h
index 9656db0ee71a6d1fd59801204627ca1002e78c54..283f2335c0287f91a7d1695962ff11678f51531c 100644 (file)
@@ -187,7 +187,8 @@ private:
   // monclient
   bool want_monmap;
   Cond map_cond;
-private:
+  bool passthrough_monmap = false;
+
   // authenticate
   std::unique_ptr<AuthClientHandler> auth;
   uint32_t want_keys = 0;
@@ -339,6 +340,21 @@ public:
   int build_initial_monmap();
   int get_monmap();
   int get_monmap_privately();
+  /**
+   * If you want to see MonMap messages, set this and
+   * the MonClient will tell the Messenger it hasn't
+   * dealt with it.
+   * Note that if you do this, *you* are of course responsible for
+   * putting the message reference!
+   */
+  void set_passthrough_monmap() {
+    Mutex::Locker l(monc_lock);
+    passthrough_monmap = true;
+  }
+  void unset_passthrough_monmap() {
+    Mutex::Locker l(monc_lock);
+    passthrough_monmap = false;
+  }
   /**
    * Ping monitor with ID @p mon_id and record the resulting
    * reply in @p result_reply.
@@ -432,7 +448,7 @@ private:
 
   void _send_command(MonCommand *r);
   void _resend_mon_commands();
-  int _cancel_mon_command(uint64_t tid, int r);
+  int _cancel_mon_command(uint64_t tid);
   void _finish_command(MonCommand *r, int ret, string rs);
   void _finish_auth();
   void handle_mon_command_ack(MMonCommandAck *ack);