]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: use proper object names for linking
authorGreg Farnum <gregory.farnum@dreamhost.com>
Mon, 2 May 2011 20:47:23 +0000 (13:47 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Mon, 2 May 2011 20:47:23 +0000 (13:47 -0700)
They were backward before, which broke EVERYTHING.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/os/FileStore.cc

index 598418c91fdf3372146e6180b4994c367bf12e90..571b9a4c353f60e6d087c493e91cf6cdf9a333a9 100644 (file)
@@ -518,19 +518,25 @@ int FileStore::lfn_link(coll_t c, coll_t cid, const sobject_t& o)
   int exist, is_lfn;
   int r;
 
-  r = lfn_get(cid, o, short_fn_old, sizeof(short_fn_old), long_fn, sizeof(long_fn), &exist, &is_lfn);
+  r = lfn_get(cid, o, short_fn_new, sizeof(short_fn_new), long_fn, sizeof(long_fn), &exist, &is_lfn);
+  dout(25) << "lfn_link called lfn_get = " << r << dendl;
   if (r < 0)
     return r;
   if (is_lfn && !exist)
     return -ENOENT;
 
-  r = lfn_get(c, o, short_fn_new, sizeof(short_fn_new), long_fn, sizeof(long_fn), &exist, &is_lfn);
+  r = lfn_get(c, o, short_fn_old, sizeof(short_fn_old), long_fn, sizeof(long_fn), &exist, &is_lfn);
+  dout(25) << "lfn_link again called lfn_get = " << r << dendl;
   if (r < 0)
     return r;
   if (is_lfn && exist)
     return -EEXIST;
 
+  dout(25) << "lfn_link short_fn_old: " << short_fn_old << dendl;
+  dout(25) << "lfn_link short_fn_new: " << short_fn_new << dendl;
+
   r = link(short_fn_old, short_fn_new);
+  dout(25) << "lfn_link called link =" << r << dendl;
   if (r < 0)
     return -errno;