Merge pull request #31657 from liewegas/fix-merge-vs-backoff

osd: release backoffs during merge

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Neha Ojha 2019-11-22 11:47:49 -08:00 committed by GitHub
commit 941807d88e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -8474,6 +8474,11 @@ bool OSD::advance_pg(
pg->write_if_dirty(rctx);
dispatch_context(rctx, pg, pg->get_osdmap(), &handle);
pg->ch->flush();
// release backoffs explicitly, since the on_shutdown path
// aggressively tears down backoff state.
if (pg->is_primary()) {
pg->release_pg_backoffs();
}
pg->on_shutdown();
OSDShard *sdata = pg->osd_shard;
{

View File

@ -1085,11 +1085,13 @@ protected:
hobject_t end = info.pgid.pgid.get_hobj_end(pool.info.get_pg_num());
add_backoff(s, begin, end);
}
public:
void release_pg_backoffs() {
hobject_t begin = info.pgid.pgid.get_hobj_start();
hobject_t end = info.pgid.pgid.get_hobj_end(pool.info.get_pg_num());
release_backoffs(begin, end);
}
protected:
// -- scrub --
public: