_rollback_to calls _delete_head before cloning the clone into place.
_delete_head sets the object info size to 0. _rollback_to now resets
the size to match the rolled back object. Previously, this bug
manifested as a failed assert in scrub when checking the object sizes.
Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
t.setattrs(coll_t(info.pgid), soid, attrs);
ssc->snapset.head_exists = true;
+ // Adjust the cached objectcontext
+ ObjectContext *clone_context = get_object_context(rollback_to_sobject,
+ oi.oloc,
+ false);
+ assert(clone_context);
+ ctx->obs->oi.size = clone_context->obs.oi.size;
+
map<snapid_t, interval_set<uint64_t> >::iterator iter =
ssc->snapset.clone_overlap.lower_bound(snapid);
interval_set<uint64_t> overlaps = iter->second;