]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PGBackend: use whoami_shard().shard in rollback*, objects*
authorSamuel Just <sam.just@inktank.com>
Sat, 1 Feb 2014 06:52:37 +0000 (22:52 -0800)
committerSamuel Just <sam.just@inktank.com>
Tue, 18 Feb 2014 04:11:06 +0000 (20:11 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PGBackend.cc
src/osd/ReplicatedBackend.cc

index 452a9bbf1fa90f1add7ea255a8a14f3f82b23806..1dddd928ada2b4b7ccc297645871144cfd161c0b 100644 (file)
@@ -143,7 +143,7 @@ int PGBackend::objects_get_attr(
   bufferptr bp;
   int r = store->getattr(
     coll,
-    hoid,
+    ghobject_t(hoid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
     attr.c_str(),
     bp);
   if (r >= 0 && out) {
@@ -159,7 +159,7 @@ int PGBackend::objects_get_attrs(
 {
   return store->getattrs(
     coll,
-    hoid,
+    ghobject_t(hoid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
     *out);
 }
 
@@ -175,7 +175,10 @@ void PGBackend::rollback_setattrs(
     if (i->second) {
       to_set[i->first] = i->second.get();
     } else {
-      t->rmattr(coll, hoid, i->first);
+      t->rmattr(
+       coll,
+       ghobject_t(hoid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
+       i->first);
     }
   }
   t->setattrs(
@@ -188,7 +191,10 @@ void PGBackend::rollback_append(
   const hobject_t &hoid,
   uint64_t old_size,
   ObjectStore::Transaction *t) {
-  t->truncate(coll, hoid, old_size);
+  t->truncate(
+    coll,
+    ghobject_t(hoid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
+    old_size);
 }
 
 void PGBackend::rollback_stash(
@@ -198,7 +204,7 @@ void PGBackend::rollback_stash(
   t->remove(coll, hoid);
   t->collection_move_rename(
     coll,
-    ghobject_t(hoid, old_version, 0),
+    ghobject_t(hoid, old_version, get_parent()->whoami_shard().shard),
     coll,
     ghobject_t(hoid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard));
 }
@@ -206,12 +212,15 @@ void PGBackend::rollback_stash(
 void PGBackend::rollback_create(
   const hobject_t &hoid,
   ObjectStore::Transaction *t) {
-  t->remove(coll, hoid);
+  t->remove(
+    coll,
+    ghobject_t(hoid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard));
 }
 
 void PGBackend::trim_stashed_object(
   const hobject_t &hoid,
   version_t old_version,
   ObjectStore::Transaction *t) {
-  t->remove(coll, ghobject_t(hoid, old_version, 0));
+  t->remove(
+    coll, ghobject_t(hoid, old_version, get_parent()->whoami_shard().shard));
 }
index 2da8cd1d26c9c02a605af2e4360434a8d52a202f..7e36c5961a3fcb731e798a6a78829debbfc405ff 100644 (file)
@@ -345,7 +345,7 @@ public:
     version_t former_version) {
     t->collection_move_rename(
       coll, hoid, coll,
-      ghobject_t(hoid, former_version, 0));
+      ghobject_t(hoid, former_version, ghobject_t::NO_SHARD));
   }
   void setattrs(
     const hobject_t &hoid,