PG: check full ratio again post-reservation

Otherwise, we might queue 30 pgs for backfill at 0.80 fullness
and then never check again filling the osd after pg 11.

Fixes: #9574
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: clean out completed trimmed objects as we go

Also, explicitely maintain a max number of concurrently trimming
objects.

Fixes: 9113
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: do not queue the snap trimmer constantly

Previously, we continuously requeued the snap trimmer while in
TrimmingObjects.  This is not a good idea now that we try to
limit the number of snap trimming repops in flight and requeue
the snap trimmer directly as those repops complete.

Fixes: #9113
Backport: giant, dumpling, firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: dump snap_trimq on pg query

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: writeout hit_set object with correct prior_version

Fixes: #9875
Backport: giant, firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 1a3ad307f1a4c0a956d6fd31d13f01ffe411a09d)
PG:: reset_interval_flush and in set_last_peering_reset

If we have a change in the prior set, but not in the up/acting set, we go back
through Reset in order to reset peering state.  Previously, we would reset
last_peering_reset in the Reset constructor.  This did not, however, reset the
flush_interval, which caused the eventual flush event to be ignored and the
peering messages to not be sent.

Instead, we will always reset_interval_flush if we are actually changing the
last_peering_reset value.

Fixes: #9821
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit d9ff3a6b789c5b9c77aefa3751bd808f5d7b8ca7)
osd/osd_types: consider CRUSH_ITEM_NONE in check_new_interval() min_size check

Fixes: #9718
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit d947050c82a511f91c98e1c76e48ffa9e187eee7)

Conflicts:
	src/osd/osd_types.cc
Merge remote-tracking branch 'origin/wip-9113' into wip-sam-firefly-backports
PG: release backfill reservations if a backfill peer rejects

Also, the full peer will wait until the rejection from the primary
to do a state transition.

Fixes: #9626
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 624aaf2a4ea9950153a89ff921e2adce683a6f51)
Merge remote-tracking branch 'origin/wip-9574' into wip-sam-firefly-backports
ReplicatedPG::on_removal: clear rollback info

Fixes: #9293
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 544b8c7ffb4af01765b87239f2d7ab88479ee779)
ReplicatedPG: cancel cb on blacklisted watcher

Fixes: #8315
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 16bd45777166c29c433af3b59254a7169e512d98)
Merge remote-tracking branch 'origin/wip-sam-firefly-backports' into firefly