From d7e21cb21732c2c672a075699ddca16fec0ec5d4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 27 Jan 2016 14:22:11 -0500 Subject: [PATCH] Revert "BlueStore: fix nid overwritten of write/zero" This reverts commit fde0f0297aaf2f2717ec1b5a4c55295452817d0c. Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 95e5bb56e3ef..b4062020879d 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5270,11 +5270,8 @@ int BlueStore::_write(TransContext *txc, << " " << offset << "~" << length << dendl; RWLock::WLocker l(c->lock); - OnodeRef o = c->get_onode(oid, false); - if (!o) { - o = c->get_onode(oid, true); - _assign_nid(txc, o); - } + OnodeRef o = c->get_onode(oid, true); + _assign_nid(txc, o); int r = _do_write(txc, c, o, offset, length, bl, fadvise_flags); txc->write_onode(o); @@ -5310,13 +5307,9 @@ int BlueStore::_zero(TransContext *txc, RWLock::WLocker l(c->lock); EnodeRef enode; - OnodeRef o = c->get_onode(oid, false); - if (o) { - _dump_onode(o); - } else { - o = c->get_onode(oid, true); - _assign_nid(txc, o); - } + OnodeRef o = c->get_onode(oid, true); + _dump_onode(o); + _assign_nid(txc, o); // overlay _do_overlay_trim(txc, o, offset, length); -- 2.47.3