]> 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>
Thu, 6 Sep 2018 06:47:23 +0000 (14:47 +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>
(cherry picked from commit 2788b132a842235282dcc82acc6db9cdb8b28f79)

src/mds/ScatterLock.h

index f74838775874c7d84142bd63c08aedc04aa1cc6d..eefd16bf2b2e47eda152e50940856640d866f3da 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) {