]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/admin_socket: switch tell queue to cref_t (from ref_t)
authorSage Weil <sage@redhat.com>
Tue, 29 Oct 2019 20:30:40 +0000 (15:30 -0500)
committerSage Weil <sage@redhat.com>
Fri, 15 Nov 2019 18:42:40 +0000 (12:42 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/admin_socket.cc
src/common/admin_socket.h
src/messages/MMonCommandAck.h

index c3b0681622c9fefb69ec87e8eda530c26a4f581f..0d6527facc8a902b42e4be095554eeb698d7304c 100644 (file)
@@ -386,8 +386,8 @@ void AdminSocket::do_accept()
 void AdminSocket::do_tell_queue()
 {
   ldout(m_cct,10) << __func__ << dendl;
-  std::list<ref_t<MCommand>> q;
-  std::list<ref_t<MMonCommand>> lq;
+  std::list<cref_t<MCommand>> q;
+  std::list<cref_t<MMonCommand>> lq;
   {
     std::lock_guard l(tell_lock);
     q.swap(tell_queue);
@@ -525,14 +525,14 @@ void AdminSocket::execute_command(
   in_hook_cond.notify_all();
 }
 
-void AdminSocket::queue_tell_command(ref_t<MCommand> m)
+void AdminSocket::queue_tell_command(cref_t<MCommand> m)
 {
   ldout(m_cct,10) << __func__ << " " << *m << dendl;
   std::lock_guard l(tell_lock);
   tell_queue.push_back(std::move(m));
   wakeup();
 }
-void AdminSocket::queue_tell_command(ref_t<MMonCommand> m)
+void AdminSocket::queue_tell_command(cref_t<MMonCommand> m)
 {
   ldout(m_cct,10) << __func__ << " " << *m << dendl;
   std::lock_guard l(tell_lock);
index 3ac5f140e1cd52149b1816fe1ac58c6491ffa109..6073869c7ef5415bc95f87781cf19be1cf1968ea 100644 (file)
@@ -117,8 +117,8 @@ public:
     std::ostream& errss,
     bufferlist *outbl);
 
-  void queue_tell_command(ref_t<MCommand> m);
-  void queue_tell_command(ref_t<MMonCommand> m); // for compat
+  void queue_tell_command(cref_t<MCommand> m);
+  void queue_tell_command(cref_t<MMonCommand> m); // for compat
 
 private:
 
@@ -149,8 +149,8 @@ private:
   std::unique_ptr<AdminSocketHook> getdescs_hook;
 
   std::mutex tell_lock;
-  std::list<ref_t<MCommand>> tell_queue;
-  std::list<ref_t<MMonCommand>> tell_legacy_queue;
+  std::list<cref_t<MCommand>> tell_queue;
+  std::list<cref_t<MMonCommand>> tell_legacy_queue;
 
   struct hook_info {
     AdminSocketHook* hook;
index 0eea4d26cb7d544b84eb44f744ee8399d2ec08be..e075452bee786e71eab0603af100ef8cb222b82b 100644 (file)
@@ -24,7 +24,7 @@ public:
   std::string rs;
 
   MMonCommandAck() : PaxosServiceMessage{MSG_MON_COMMAND_ACK, 0} {}
-  MMonCommandAck(std::vector<std::string>& c, int _r, std::string s, version_t v) : 
+  MMonCommandAck(const std::vector<std::string>& c, int _r, std::string s, version_t v) :
     PaxosServiceMessage{MSG_MON_COMMAND_ACK, v},
     cmd(c), r(_r), rs(s) { }
 private: