]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove unnecessary flush() from PurgeQueue
authorJohn Spray <john.spray@redhat.com>
Mon, 13 Feb 2017 00:50:11 +0000 (00:50 +0000)
committerJohn Spray <john.spray@redhat.com>
Wed, 8 Mar 2017 10:27:01 +0000 (10:27 +0000)
We can drive all flushing from the read side.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/PurgeQueue.cc

index 6158179409e35bfe609e260909d68dc9d76ddab2..40ece7ecb5064a5c7c1b4b3e1351598ec7c2f41f 100644 (file)
@@ -173,10 +173,10 @@ void PurgeQueue::push(const PurgeItem &pi, Context *completion)
 
   ::encode(pi, bl);
   journaler.append_entry(bl);
+  journaler.wait_for_flush(completion);
 
-  // Note that flush calls are not 1:1 with IOs, Journaler
-  // does its own batching.  So we just call every time.
-  journaler.flush(completion);
+  // It is not necessary to explicitly flush here, because the reader
+  // will get flushes generated inside Journaler::is_readable
 
   // Maybe go ahead and do something with it right away
   _consume();