]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: clear oi from trim_object() 15519/head
authorSage Weil <sage@redhat.com>
Mon, 12 Jun 2017 18:05:41 +0000 (14:05 -0400)
committerSage Weil <sage@redhat.com>
Mon, 12 Jun 2017 18:05:41 +0000 (14:05 -0400)
trim_object() is unique in that its resulting OpContxtUPtr is fed to
simple_opc_submit() but does not first pass through finish_ctx().  Almost
none of what finish_ctx is helpful for us because we are the only place
where we delete a clone, and for that reason it is not terribly useful to
put what we do into finish_ctx.  However, *one* thing that finish_ctx()
does do that we don't (didn't) is clear out the object_info_t io on
delete.  This would leave things like version with a value that would
bleed into future instantiations of the object and break things like
the prior_version in pg_log_entry_t's and, much later, break asserts
when loading the missing set off of disk.

Fix by clearing oi.

Fixes: http://tracker.ceph.com/issues/19947
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc

index 87616ae48a706e453a202501144109ddc216b114..21327cac06f67c2b35421ec62cbd18a0a371c7b7 100644 (file)
@@ -3767,6 +3767,9 @@ PrimaryLogPG::OpContextUPtr PrimaryLogPG::trim_object(
       coid,
       old_snaps,
       new_snaps);
+
+    obc->obs.oi = object_info_t(coid);
+
     ctx->at_version.version++;
   } else {
     // save adjusted snaps for this object
@@ -3848,7 +3851,7 @@ PrimaryLogPG::OpContextUPtr PrimaryLogPG::trim_object(
        ctx->delta_stats.num_objects_pinned--;
     }
     ctx->snapset_obc->obs.exists = false;
-    
+    obc->obs.oi = object_info_t(coid);
     t->remove(snapoid);
   } else {
     dout(10) << coid << " filtering snapset on " << snapoid << dendl;