osd/PG: align past_intervals and last_epoch_clean for fabricated merge target
When we are fabricating a merge target, we have to construct a
meaningful pg_history_t and PastIntervals. We do this with
pieces of the source PG and the last_epoch_clean and
last_epoch_started values from the pg_pool_t. This usually
works, except when
- source and target become clean, and we decrement pg_num
- OSD mapping changes (for source and target)
- source repeers, but target does not
- OSD with source only tries to merge
In this case, the source will have a past_intervals start that is
later than the last_epoch_clean implied in the pg_pool_t.
This situation is harmless because we do not allow the actual
mappings of source and target to diverge during the merge window,
so if the source's past intervals was adjusted we can still use
it. Avoid logging errors by adjusting the start epoch backwards.
Fixes: http://tracker.ceph.com/issues/37511 Signed-off-by: Sage Weil <sage@redhat.com>