Merge pull request #1382 from ceph/wip-7616

Wip 7616

Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Samuel Just 2014-03-05 15:18:19 -08:00
commit 16e3d4d36f
2 changed files with 9 additions and 5 deletions

View File

@ -4465,10 +4465,12 @@ int FileStore::_collection_move_rename(coll_t oldcid, const ghobject_t& oldoid,
_inject_failure();
// the name changed; link the omap content
r = object_map->clone(oldoid, o, &spos);
if (r == -ENOENT)
r = 0;
if (r == 0) {
// the name changed; link the omap content
r = object_map->clone(oldoid, o, &spos);
if (r == -ENOENT)
r = 0;
}
_inject_failure();

View File

@ -235,7 +235,9 @@ void PGBackend::rollback_stash(
version_t old_version,
ObjectStore::Transaction *t) {
assert(!hoid.is_temp());
t->remove(coll, hoid);
t->remove(
coll,
ghobject_t(hoid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard));
t->collection_move_rename(
coll,
ghobject_t(hoid, old_version, get_parent()->whoami_shard().shard),