]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: move mdlog flush to scatter_writebehind() 45243/head
authorXiubo Li <xiubli@redhat.com>
Fri, 4 Mar 2022 07:10:46 +0000 (15:10 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 17 Mar 2022 05:00:57 +0000 (13:00 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mds/Locker.cc

index 275a402147b83f4ff2d51b6e1df034e0fd962af0..12a59bb55c06efaafb1c72c0d952f38f1a7bd580 100644 (file)
@@ -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<ScatterLock *>(lock));
-       mds->mdlog->flush();
        return;
       }
       lock->clear_flushed();
@@ -4691,7 +4690,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<ScatterLock*>(lock));
-      mds->mdlog->flush();
       return false;
     }
 
@@ -4850,7 +4848,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<ScatterLock*>(lock));
-    mds->mdlog->flush();
     return;
   }
 
@@ -4992,6 +4989,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)