From: John Spray Date: Wed, 21 Jun 2017 11:21:42 +0000 (-0400) Subject: client: check for luminous MDS before sending FLUSH_MDLOG X-Git-Tag: v12.1.0~1^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7c6990d9164d8a5e423356f763fb911c2c03cfc1;p=ceph.git client: check for luminous MDS before sending FLUSH_MDLOG This is needed to make it safe to run newer clients on pre-luminous MDS. Signed-off-by: John Spray --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 15019d11e13b..c5813ed88e5a 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -5812,8 +5812,13 @@ void Client::flush_mdlog_sync() void Client::flush_mdlog(MetaSession *session) { - MClientSession *m = new MClientSession(CEPH_SESSION_REQUEST_FLUSH_MDLOG); - session->con->send_message(m); + // Only send this to Luminous or newer MDS daemons, older daemons + // will crash if they see an unknown CEPH_SESSION_* value in this msg. + const uint64_t features = session->con->get_features(); + if (HAVE_FEATURE(features, SERVER_LUMINOUS)) { + MClientSession *m = new MClientSession(CEPH_SESSION_REQUEST_FLUSH_MDLOG); + session->con->send_message(m); + } }