]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: avoid unnecessary write_onode calls
authorSage Weil <sage@redhat.com>
Thu, 26 May 2016 14:02:44 +0000 (10:02 -0400)
committerSage Weil <sage@redhat.com>
Wed, 1 Jun 2016 15:40:49 +0000 (11:40 -0400)
_wctx_finish callers always write the onode; we only need to worry about
our changes to the bnode.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 587f9a723a5bad105f6bc53f75a1a474de186ed0..fac223a7829f118834e1279ca12782cb27ea0521 100644 (file)
@@ -5666,9 +5666,7 @@ void BlueStore::_wctx_finish(
     } else {
       dout(20) << __func__ << " keep blob " << *b << dendl;
     }
-    if (l.blob >= 0) {
-      txc->write_onode(o);
-    } else {
+    if (l.blob < 0) {
       txc->write_bnode(o->bnode);
     }
   }
@@ -5771,6 +5769,7 @@ int BlueStore::_do_write(
   }
 
   _wctx_finish(txc, c, o, &wctx);
+  txc->write_onode(o);
 
   if (end > o->onode.size) {
     dout(20) << __func__ << " extending size to 0x" << std::hex << end