]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd, tools: Always filter temp objects since not being exported
authorDavid Zafman <dzafman@redhat.com>
Tue, 7 Jul 2015 01:14:06 +0000 (18:14 -0700)
committerSage Weil <sage@redhat.com>
Fri, 10 Jul 2015 15:30:17 +0000 (11:30 -0400)
Can't use object_locator_to_pg() directly with a temp object
because the pool is negative.

Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/osd_types.cc
src/tools/ceph_objectstore_tool.cc

index 6224838cca3e649041db4609a460c37c02422a32..f91ba63d64ac36974fd1a2730d70b26444355468 100644 (file)
@@ -3125,6 +3125,12 @@ void pg_log_t::filter_log(spg_t import_pgid, const OSDMap &curmap,
   for (list<pg_log_entry_t>::const_iterator i = in.log.begin();
        i != in.log.end(); ++i) {
 
+    // Reject pg log entries for temporary objects
+    if (i->soid.is_temp()) {
+      reject.log.push_back(*i);
+      continue;
+    }
+
     if (i->soid.nspace != hit_set_namespace) {
       object_t oid = i->soid.oid;
       object_locator_t loc(i->soid);
index 67cce7fa908a079ed03ebbc84a4a5199a954ef01..39d720c06571fbbb6d6eeb477f2815e729bbd79d 100644 (file)
@@ -1102,6 +1102,12 @@ void filter_divergent_priors(spg_t import_pgid, const OSDMap &curmap,
   for (divergent_priors_t::const_iterator i = in.begin();
        i != in.end(); ++i) {
 
+    // Reject divergent priors for temporary objects
+    if (i->second.is_temp()) {
+      reject.insert(*i);
+      continue;
+    }
+
     if (i->second.nspace != hit_set_namespace) {
       object_t oid = i->second.oid;
       object_locator_t loc(i->second);