From: Sage Weil Date: Fri, 10 Jan 2014 00:04:21 +0000 (-0800) Subject: osd/ReplicatedPG: update ObjectContext's object_info_t for new hit_set objects X-Git-Tag: v0.77~22^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d41a1d3d8289d198f8ca07d887fa4040940d125f;p=ceph.git osd/ReplicatedPG: update ObjectContext's object_info_t for new hit_set objects We were fabricating an object_info_t correctly and writing it to disk, but it was not reflected by the in-memory ObjectContext. If something came along quickly (like backfill) and tried to use it, the info would be invalid. Fix this by fabricating it in the obc and copying it to the new_obs for the update. Fixes: #7122 Signed-off-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index d834a3a12bd4..214f48c905e6 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -9786,10 +9786,12 @@ void ReplicatedPG::hit_set_persist() } // fabricate an object_info_t and SnapSet - ctx->new_obs.oi.version = ctx->at_version; - ctx->new_obs.oi.mtime = now; - ctx->new_obs.oi.size = bl.length(); - ctx->new_obs.exists = true; + obc->obs.oi.version = ctx->at_version; + obc->obs.oi.mtime = now; + obc->obs.oi.size = bl.length(); + obc->obs.exists = true; + + ctx->new_obs = obc->obs; ctx->new_snapset.head_exists = true; ctx->delta_stats.num_objects++;