From: John Spray Date: Mon, 13 Feb 2017 00:50:11 +0000 (+0000) Subject: mds: remove unnecessary flush() from PurgeQueue X-Git-Tag: v12.0.1~140^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0933f61d829cf604f03f6be5c0ec10f2702cf76a;p=ceph.git mds: remove unnecessary flush() from PurgeQueue We can drive all flushing from the read side. Signed-off-by: John Spray --- diff --git a/src/mds/PurgeQueue.cc b/src/mds/PurgeQueue.cc index 6158179409e3..40ece7ecb506 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();