]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: switch flushing ScatterLock to dirty ScatterLock after cache rejoin
authorYan, Zheng <zheng.z.yan@intel.com>
Sun, 4 May 2014 15:06:32 +0000 (23:06 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Thu, 8 May 2014 03:29:17 +0000 (11:29 +0800)
Otherwise the flushing flag may confuse Locker::eval_gather() if MDS later
imports lock's parent inode.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/ScatterLock.h

index a85caa824ace6d569c2a899798d5a65699309d6b..2d17b567bc53135bc32e5a958cbaca526360a0cc 100644 (file)
@@ -201,6 +201,14 @@ public:
     ::encode(s, bl);
   }
 
+  void decode_state_rejoin(bufferlist::iterator& p, list<Context*>& waiters) {
+    SimpleLock::decode_state_rejoin(p, waiters);
+    if (is_flushing()) {
+      set_dirty();
+      clear_flushing();
+    }
+  }
+
   bool remove_replica(int from, bool rejoin) {
     if (rejoin &&
        (state == LOCK_MIX ||