From: Sage Weil Date: Wed, 27 Jan 2016 19:20:01 +0000 (-0500) Subject: Revert "BlueStore: fix dest onode process logic of clone_range" X-Git-Tag: v10.0.4~101^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d1d88ba068cb3f299f762e5c91da15f062d33c5f;p=ceph.git Revert "BlueStore: fix dest onode process logic of clone_range" This reverts commit 696584cf6523d997cac2bf43d3234fd8518ef40b. _assign_nid is safe to call again, and we want to avoid dup calls to get_onode. Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index d4b23ebf6bab..ef67d80b62e2 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -6062,15 +6062,10 @@ int BlueStore::_clone_range(TransContext *txc, r = -ENOENT; goto out; } - - newo = c->get_onode(new_oid, false); - if (!newo) { - newo = c->get_onode(new_oid, true); - _assign_nid(txc, newo); - } + newo = c->get_onode(new_oid, true); assert(newo); newo->exists = true; - + r = _do_read(oldo, srcoff, length, bl, 0); if (r < 0) goto out;