]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Avoid extra check for clean object 1848/head
authorHaomai Wang <haomaiwang@gmail.com>
Wed, 21 May 2014 10:12:22 +0000 (18:12 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Wed, 21 May 2014 10:14:49 +0000 (18:14 +0800)
We needn't to check clean object via buffer state, skip the clean object.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/osdc/ObjectCacher.cc

index e0273bc5314a49f64494c789fdd4bb2cab7442ca..d3626884fcd2b639eafbd3b0e30289ff9d285c6a 100644 (file)
@@ -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 "