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>
(cherry picked from commit
8b985561ba08d4ed2d7751a8e09f9d9067c5fbd3)
// Info
child->info.history = info.history;
+ child->info.history.epoch_created = get_osdmap()->get_epoch();
child->info.purged_snaps = info.purged_snaps;
child->info.last_backfill = info.last_backfill;
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;