From: Yan, Zheng Date: Tue, 22 Aug 2017 01:59:12 +0000 (+0800) Subject: mds: fix CDir::log_mark_dirty() X-Git-Tag: v10.2.11~65^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1ed5fcdaae6fe1aa8ee2eae53f8a099e75b3cef1;p=ceph.git mds: fix CDir::log_mark_dirty() 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" (cherry picked from commit 461bbc7e89a9ed440478f30145158b4989c137d0) --- diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index e722262cbdec9..dbc1a08871c47 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -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();