From d4a4827f17611d798dad6472a3307d2616c7a764 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Fri, 17 Jun 2016 17:37:36 +0800 Subject: [PATCH] client: discard mds map if it is identical to ours Otherwise it is a pure waste to handle this. Signed-off-by: xie xingguo --- src/client/Client.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 0c3b7a614379d..3c4dc9f497ddd 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2506,9 +2506,10 @@ void Client::handle_fs_map_user(MFSMapUser *m) void Client::handle_mds_map(MMDSMap* m) { - if (m->get_epoch() < mdsmap->get_epoch()) { - ldout(cct, 1) << "handle_mds_map epoch " << m->get_epoch() << " is older than our " - << mdsmap->get_epoch() << dendl; + if (m->get_epoch() <= mdsmap->get_epoch()) { + ldout(cct, 1) << "handle_mds_map epoch " << m->get_epoch() + << " is identical to or older than our " + << mdsmap->get_epoch() << dendl; m->put(); return; }