]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Only write bufferhead when it's dirty 2149/head
authorHaomai Wang <haomaiwang@gmail.com>
Sun, 27 Jul 2014 05:37:49 +0000 (13:37 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Sun, 27 Jul 2014 05:37:49 +0000 (13:37 +0800)
The TX state bh should be skipped because the bh should be inflight. We only
need to write dirty bh. And TX and dirty state bh both should be waited until
flushed.

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

index ed18adc7e85484aa280137569a3e08d1622b98d9..e7dfe18bb0608781bbf156d850e20a3a8b143d4b 100644 (file)
@@ -1621,7 +1621,10 @@ bool ObjectCacher::flush_set(ObjectSet *oset, Context *onfinish)
     next++;
     BufferHead *bh = *it;
     waitfor_commit.insert(bh->ob);
-    bh_write(bh);
+
+    if (bh->is_dirty())
+      bh_write(bh);
+
     it = next;
   }