]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "BlueStore: fix dest onode process logic of clone_range"
authorSage Weil <sage@redhat.com>
Wed, 27 Jan 2016 19:20:01 +0000 (14:20 -0500)
committerSage Weil <sage@redhat.com>
Wed, 27 Jan 2016 19:20:01 +0000 (14:20 -0500)
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 <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index d4b23ebf6bab0b0c6145c4dbe0ddf63c1b887abd..ef67d80b62e21ddf5a3c4dd7666ea9debf0ec4e8 100644 (file)
@@ -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;