]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: dir->mark_new() should together with dir->mark_dirty() 38109/head
authorYan, Zheng <zyan@redhat.com>
Mon, 16 Nov 2020 14:44:00 +0000 (22:44 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 16 Nov 2020 14:49:52 +0000 (22:49 +0800)
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" <zyan@redhat.com>
src/mds/MDCache.cc

index b4b00eac9265f43789d6fe79ed2c47858a0380da..cbe35f075594135e9f2cc4d23c99ea576101a6fc 100644 (file)
@@ -11901,6 +11901,7 @@ void MDCache::_fragment_logged(MDRequestRef& mdr)
   for (const auto& dir : info.resultfrags) {
     dout(10) << " storing result frag " << *dir << dendl;
 
+    dir->mark_dirty(mdr->ls);
     dir->mark_new(mdr->ls);
 
     // freeze and store them too