From 3d49c2eb57ae39d752175635a0d8f4843ffa303b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 26 May 2016 10:02:44 -0400 Subject: [PATCH] os/bluestore: avoid unnecessary write_onode calls _wctx_finish callers always write the onode; we only need to worry about our changes to the bnode. Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 587f9a723a5..fac223a7829 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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 -- 2.39.5