]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: set MMonGetVersionReply tid 1849/head
authorIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 12 May 2014 08:30:45 +0000 (12:30 +0400)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Wed, 21 May 2014 08:20:51 +0000 (12:20 +0400)
Currently we don't set MMonGetVersionReply tid even if the original
MMonGetVersion message had a non-zero tid.  This is bad for the kernel
client, which has the infrastructure in place that relies on tids to
lookup message buffers and contexts.  To kick off transitioning away
from the workaround, set MMonGetVersionReply tid to the tid of the
original MMonGetVersion message.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
src/mon/Monitor.cc

index c8e6e5c1be5c8fa1c168b078100f90b02c1f9967..036c2f6712bb337411dad80631588a2efafd2c30 100644 (file)
@@ -3576,10 +3576,13 @@ void Monitor::handle_get_version(MMonGetVersion *m)
       svc->wait_for_readable(new C_RetryMessage(this, m));
       goto out;
     }
+
     MMonGetVersionReply *reply = new MMonGetVersionReply();
     reply->handle = m->handle;
     reply->version = svc->get_last_committed();
     reply->oldest_version = svc->get_first_committed();
+    reply->set_tid(m->get_tid());
+
     messenger->send_message(reply, m->get_source_inst());
   }