This change is motivated by the failures seen in the multimds suite,
where we hit assert(s <= can_rollback_to), while trimming the log in ec
pools.
This is due to the fact that we had removed limits on the trim_to value to
address https://tracker.ceph.com/issues/23979.
But, seems that this could be dangerous for ec pools. So, keep the
can_rollback_to limit, while calculating the trim_to value.
Fixes: http://tracker.ceph.com/issues/21416
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit
4b5c6b88d444e2173e716fe4890717873c8dc8e5)
PG_STATE_BACKFILL_TOOFULL)) {
target = cct->_conf->osd_max_pg_log_entries;
}
- // limit pg log trimming up to the head of the log
- eversion_t limit = pg_log.get_head();
+ // limit pg log trimming up to the can_rollback_to value
+ eversion_t limit = std::min(
+ pg_log.get_head(),
+ pg_log.get_can_rollback_to());
dout(10) << __func__ << " limit = " << limit << dendl;
if (limit != eversion_t() &&