Skip to content

Commit

Permalink
client: discard mds map if it is identical to ours
Browse files Browse the repository at this point in the history
Otherwise it is a pure waste to handle this.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
  • Loading branch information
xiexingguo committed Jun 18, 2016
1 parent 4b85e31 commit d4a4827
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/client/Client.cc
Expand Up @@ -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;
}
Expand Down

0 comments on commit d4a4827

Please sign in to comment.