From: Yan, Zheng Date: Mon, 16 Nov 2020 14:44:00 +0000 (+0800) Subject: mds: dir->mark_new() should together with dir->mark_dirty() X-Git-Tag: v15.2.9~30^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=02ca2d84b9a90887208fb9226abdc1bef701a4aa;p=ceph.git mds: dir->mark_new() should together with dir->mark_dirty() Otherwise, the 'new' flag won't get cleared after dir is committed. The leftover 'new' flag will confuse later journal and dir commit. Fixes: https://tracker.ceph.com/issues/48249 Signed-off-by: "Yan, Zheng" (cherry picked from commit be4710a1496c46f3307966ddfa416e932d878603) Conflicts: src/mds/MDCache.cc - in octopus, CDir::mark_dirty() takes a version_t argument in addition to the LogSegment* pointer --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 77266416f202..73ca762962f6 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -11995,6 +11995,7 @@ void MDCache::_fragment_logged(MDRequestRef& mdr) for (const auto& dir : info.resultfrags) { dout(10) << " storing result frag " << *dir << dendl; + dir->mark_dirty(dir->pre_dirty(), mdr->ls); dir->mark_new(mdr->ls); // freeze and store them too