From a4df06da414ad0d1fdd62847dae35e7e32a04495 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Mon, 16 Nov 2020 22:44:00 +0800 Subject: [PATCH] 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 - the "mark_dirty" method requires an additional boilerplate argument in nautilus --- src/mds/MDCache.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 03c36c093364..2a294a8ddb74 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -11676,6 +11676,7 @@ void MDCache::_fragment_logged(MDRequestRef& mdr) CDir *dir = *p; 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 -- 2.47.3