From: Xiubo Li Date: Fri, 4 Mar 2022 07:10:46 +0000 (+0800) Subject: ceph: move mdlog flush to scatter_writebehind() X-Git-Tag: v17.2.4~92^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F46494%2Fhead;p=ceph.git ceph: move mdlog flush to scatter_writebehind() Signed-off-by: Xiubo Li (cherry picked from commit d41359a47e9f068de7f2e7e0cce99888abbf4069) --- diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index b7bcc8ca8a53..a73c4225cbf2 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -1201,7 +1201,6 @@ void Locker::eval_gather(SimpleLock *lock, bool first, bool *pneed_issue, MDSCon if (lock->is_dirty() && !lock->is_flushed()) { scatter_writebehind(static_cast(lock)); - mds->mdlog->flush(); return; } lock->clear_flushed(); @@ -4698,7 +4697,6 @@ bool Locker::simple_sync(SimpleLock *lock, bool *need_issue) if (!gather && lock->is_dirty()) { lock->get_parent()->auth_pin(lock); scatter_writebehind(static_cast(lock)); - mds->mdlog->flush(); return false; } @@ -4857,7 +4855,6 @@ void Locker::simple_lock(SimpleLock *lock, bool *need_issue) if (!gather && lock->is_dirty()) { lock->get_parent()->auth_pin(lock); scatter_writebehind(static_cast(lock)); - mds->mdlog->flush(); return; } @@ -4999,6 +4996,7 @@ void Locker::scatter_writebehind(ScatterLock *lock) in->finish_scatter_gather_update_accounted(lock->get_type(), &le->metablob); mds->mdlog->submit_entry(le, new C_Locker_ScatterWB(this, lock, mut)); + mds->mdlog->flush(); } void Locker::scatter_writebehind_finish(ScatterLock *lock, MutationRef& mut)