From 0933f61d829cf604f03f6be5c0ec10f2702cf76a Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 13 Feb 2017 00:50:11 +0000 Subject: [PATCH] mds: remove unnecessary flush() from PurgeQueue We can drive all flushing from the read side. Signed-off-by: John Spray --- src/mds/PurgeQueue.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mds/PurgeQueue.cc b/src/mds/PurgeQueue.cc index 6158179409e..40ece7ecb50 100644 --- a/src/mds/PurgeQueue.cc +++ b/src/mds/PurgeQueue.cc @@ -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(); -- 2.47.3