]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix sessionmap version increasement when replaying ESessions
authorYan, Zheng <zyan@redhat.com>
Thu, 8 Dec 2016 02:25:18 +0000 (10:25 +0800)
committerYan, Zheng <zyan@redhat.com>
Fri, 9 Dec 2016 03:33:33 +0000 (11:33 +0800)
SessionMap::open_sessions() is used by ESessions::replay() to open
sessions that were opened by Server::prepare_force_open_sessions().

Server::prepare_force_open_sessions() increases session map's version
for each opened sessions. But SessionMap::open_sessions() only increases
session map's version by one.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/SessionMap.h

index fbd488ea83cc3e90cfa13473cf3618dcb363aa1d..f5f049e88b3ff90ed511491e44d6a9b546164a45 100644 (file)
@@ -563,8 +563,8 @@ public:
         ++p) {
       Session *s = get_or_add_session(p->second);
       set_state(s, Session::STATE_OPEN);
+      version++;
     }
-    version++;
   }
 
   // helpers