]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: remove src on EEXIST during collection_move replay
authorSamuel Just <samuel.just@dreamhost.com>
Wed, 21 Mar 2012 17:36:21 +0000 (10:36 -0700)
committerSamuel Just <samuel.just@dreamhost.com>
Wed, 21 Mar 2012 23:35:27 +0000 (16:35 -0700)
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/os/FileStore.cc

index f6025ab00a625a940cf118975c6f1e0e77edc7b1..2a4032a199908464b2e3a4a2b1a17f900e3dac88 100644 (file)
@@ -4275,7 +4275,7 @@ int FileStore::_collection_move(coll_t c, coll_t oldcid, const hobject_t& o)
 {
   dout(15) << "collection_move " << c << "/" << o << " from " << oldcid << "/" << o << dendl;
   int r = lfn_link(oldcid, c, o);
-  if (r == 0)
+  if (r == 0 || (replaying && r == -EEXIST))
     r = lfn_unlink(oldcid, o);
   dout(10) << "collection_move " << c << "/" << o << " from " << oldcid << "/" << o << " = " << r << dendl;
   return r;