]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: discard mds map if it is identical to ours 9774/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 17 Jun 2016 09:37:36 +0000 (17:37 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sat, 18 Jun 2016 02:37:45 +0000 (10:37 +0800)
Otherwise it is a pure waste to handle this.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/client/Client.cc

index 0c3b7a614379d5ad8dfeb41ae8de22d538753dfe..3c4dc9f497ddd4a25792a9ad587995539eee81ca 100644 (file)
@@ -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;
   }