]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: clear scatterlock's flushed when removing dirty
authorYan, Zheng <zyan@redhat.com>
Tue, 7 Aug 2018 03:39:04 +0000 (11:39 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 28 Aug 2018 23:12:42 +0000 (07:12 +0800)
If mds imports scatterlock's parent inode later, the leftover flushed
flag may prevent Locker::eval_gather from calling scatter_writebehind
and result incorrect dirstat/neststat.

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

index ab963986bbc2a891f6ef0e97eec47a217e5880d4..d7c7380b0f1164e59e33209aa85ebf5a861d5ce1 100644 (file)
@@ -148,12 +148,13 @@ public:
       }
     }
   }
+  void clear_flushed() override {
+    state_flags &= ~FLUSHED;
+  }
   void remove_dirty() {
     start_flush();
     finish_flush();
-  }
-  void clear_flushed() override {
-    state_flags &= ~FLUSHED;
+    clear_flushed();
   }
 
   void infer_state_from_strong_rejoin(int rstate, bool locktoo) {