if we have a wrong "created", OSD receiving an osd_pg_create message
could fail to project its history and crash. a bad split_bits could
mislead the monitor and osd, and hence cause problems.
* set child.info.history.epoch_created to osdmap.get_epoch() instead of
using the parent's epoch_created
* set child.info.stats.parent_split_bits to the calculated split_bits
instead using the parent's split_bits
Fixes: http://tracker.ceph.com/issues/15426
Signed-off-by: Kefu Chai <kchai@redhat.com>
// Info
child->info.history = info.history;
+ child->info.history.epoch_created = get_osdmap()->get_epoch();
child->info.purged_snaps = info.purged_snaps;
if (info.last_backfill.is_max()) {
}
child->info.stats = info.stats;
+ child->info.stats.parent_split_bits = split_bits;
info.stats.stats_invalid = true;
child->info.stats.stats_invalid = true;
child->info.last_epoch_started = info.last_epoch_started;