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 <sage@inktank.com>
}
// 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++;