From: Chencan Date: Tue, 30 Jun 2020 11:30:12 +0000 (+0800) Subject: mds: do not submit omap_rm_keys if the dir is the basedir of merge. X-Git-Tag: v16.1.0~1749^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F35848%2Fhead;p=ceph.git mds: do not submit omap_rm_keys if the dir is the basedir of merge. Fixes: https://tracker.ceph.com/issues/46273 Signed-off-by: Chencan --- diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc old mode 100644 new mode 100755 index 6acc5d025bc0..d46a97c6c388 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -2231,10 +2231,11 @@ void CDir::_omap_commit(int op_prio) }; if (state_test(CDir::STATE_FRAGMENTING)) { + assert(committed_version == 0); for (auto p = items.begin(); p != items.end(); ) { CDentry *dn = p->second; ++p; - if (!dn->is_dirty() && dn->get_linkage()->is_null()) + if (dn->get_linkage()->is_null()) continue; write_one(dn); }