From f51e33bd9c5a8e1cfc7065b30785696dc45918bc Mon Sep 17 00:00:00 2001 From: Haomai Wang Date: Wed, 21 May 2014 18:12:22 +0800 Subject: [PATCH] Avoid extra check for clean object We needn't to check clean object via buffer state, skip the clean object. Signed-off-by: Haomai Wang --- src/osdc/ObjectCacher.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index e0273bc5314a4..d3626884fcd2b 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -1618,6 +1618,9 @@ bool ObjectCacher::flush_set(ObjectSet *oset, Context *onfinish) !i.end(); ++i) { Object *ob = *i; + if (ob->dirty_or_tx == 0) + continue; + if (!flush(ob, 0, 0)) { // we'll need to gather... ldout(cct, 10) << "flush_set " << oset << " will wait for ack tid " -- 2.39.5