osd/PG: clear_ready_to_merge on_shutdown (or final merge source prep)

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-06-12 07:15:02 -05:00
parent 925163c7eb
commit f6ecd69906
2 changed files with 5 additions and 0 deletions

View File

@ -1673,6 +1673,7 @@ void OSDService::_send_ready_to_merge()
void OSDService::clear_ready_to_merge(PG *pg)
{
Mutex::Locker l(merge_lock);
dout(10) << __func__ << " " << pg->pg_id << dendl;
ready_to_merge_source.erase(pg->pg_id.pgid);
ready_to_merge_target.erase(pg->pg_id.pgid);
}

View File

@ -11955,6 +11955,10 @@ void PrimaryLogPG::on_shutdown()
clear_primary_state();
cancel_recovery();
if (is_primary()) {
osd->clear_ready_to_merge(this);
}
}
void PrimaryLogPG::on_activate()