]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: move mdlog flush to scatter_writebehind() 46494/head
authorXiubo Li <xiubli@redhat.com>
Fri, 4 Mar 2022 07:10:46 +0000 (15:10 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 18 Aug 2022 00:52:57 +0000 (08:52 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit d41359a47e9f068de7f2e7e0cce99888abbf4069)

src/mds/Locker.cc

index b7bcc8ca8a532e02fdaae55752ee3b5680846d4a..a73c4225cbf27d58986db974401249b03058faee 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();
@@ -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<ScatterLock*>(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<ScatterLock*>(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)