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~175^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F13715%2Fhead;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 d5ff8d81c1f1..f64346231712 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -8090,9 +8090,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); @@ -8105,9 +8105,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;