From: wangzhengyong Date: Fri, 3 Mar 2017 09:16:21 +0000 (+0800) Subject: os/bluestore: "noid" is not always necessary in clone op X-Git-Tag: v12.0.1~35^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37cf79c43f8bedbbbd30ba05c365658312baa4fa;p=ceph.git os/bluestore: "noid" is not always necessary in clone op Signed-off-by: wangzhengyong@cmss.chinamobile.com --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 151b0140300..89eeec8bf8b 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -8092,9 +8092,9 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t) case Transaction::OP_CLONE: { - const ghobject_t& noid = i.get_oid(op->dest_oid); OnodeRef& no = ovec[op->dest_oid]; if (!no) { + const ghobject_t& noid = i.get_oid(op->dest_oid); no = c->get_onode(noid, true); } r = _clone(txc, c, o, no); @@ -8107,9 +8107,9 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t) case Transaction::OP_CLONERANGE2: { - const ghobject_t& noid = i.get_oid(op->dest_oid); OnodeRef& no = ovec[op->dest_oid]; if (!no) { + const ghobject_t& noid = i.get_oid(op->dest_oid); no = c->get_onode(noid, true); } uint64_t srcoff = op->off;