]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore::lfn_link: handle link within a collection
authorSamuel Just <sam.just@inktank.com>
Thu, 5 Dec 2013 22:55:18 +0000 (14:55 -0800)
committerSamuel Just <sam.just@inktank.com>
Wed, 22 Jan 2014 22:39:14 +0000 (14:39 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/os/FileStore.cc

index d18393c06ab73bded167a5056d827001f1826750..2a79e8bc350d21a6255c4bec005badf1f0dfde94 100644 (file)
@@ -293,6 +293,11 @@ int FileStore::lfn_link(coll_t c, coll_t newcid, const ghobject_t& o, const ghob
     r = get_index(c, &index_old);
     if (r < 0)
       return r;
+  } else if (c == newcid) {
+    r = get_index(c, &index_old);
+    if (r < 0)
+      return r;
+    index_new = index_old;
   } else {
     r = get_index(c, &index_old);
     if (r < 0)