]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix CDir::log_mark_dirty() 21156/head
authorYan, Zheng <zyan@redhat.com>
Tue, 22 Aug 2017 01:59:12 +0000 (09:59 +0800)
committerNathan Cutler <ncutler@suse.com>
Sat, 31 Mar 2018 12:00:34 +0000 (14:00 +0200)
the 'will dirty' check is wrong because we don't always project fnode.

Fixes: http://tracker.ceph.com/issues/21584
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 461bbc7e89a9ed440478f30145158b4989c137d0)

src/mds/CDir.cc

index e722262cbdec9ae8de1546c1469af79853484844..dbc1a08871c477ee6324342dc6b4a104a1e3137d 100644 (file)
@@ -1361,7 +1361,7 @@ void CDir::mark_clean()
 // caller should hold auth pin of this
 void CDir::log_mark_dirty()
 {
-  if (is_dirty() || is_projected())
+  if (is_dirty() || projected_version > get_version())
     return; // noop if it is already dirty or will be dirty
 
   version_t pv = pre_dirty();