From: Haomai Wang Date: Wed, 21 May 2014 10:12:22 +0000 (+0800) Subject: Avoid extra check for clean object X-Git-Tag: v0.67.10~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=617914209694f67150264358da888c1ca9ff42e1;p=ceph.git 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 (cherry picked from commit f51e33bd9c5a8e1cfc7065b30785696dc45918bc) --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 4d832a55a118..ddcdf7746a62 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -1605,6 +1605,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 "