]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/scrub: check all(*) conditions in restrictions_on_scrubbing()
authorRonen Friedman <rfriedma@redhat.com>
Fri, 2 May 2025 08:03:15 +0000 (03:03 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Mon, 5 May 2025 08:02:44 +0000 (03:02 -0500)
commitfcdb73e5190d0401624f67d975a29692222ecfa7
treeb87cae1bb9f408e88d318f44e240896222d34754
parent8be7d0163bca18789232440b6c3a8a8999ae1e62
osd/scrub: check all(*) conditions in restrictions_on_scrubbing()

Modified OsdScrub::restrictions_on_scrubbing() to check all(*)
conditions, instead of stopping at the first one that is true.
The "new" (since Tentacle) scrub-type-to-conditions mapping is no
longer a simple one (is not "monotonic" in the sense of restrictions
always being removed as the scrub type is more important),
and the caller may want to know them all.

(*) The somewhat costly check for the random backoff is still only
    performed if the OSD is not already running too many scrubs.

Fixes: https://tracker.ceph.com/issues/71169
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 5a3a4f73476580b44442a30c8404a62b5055c96d)
src/osd/scrubber/osd_scrub.cc
src/osd/scrubber/osd_scrub.h