]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/scrub: check all(*) conditions in restrictions_on_scrubbing() 63093/head
authorRonen Friedman <rfriedma@redhat.com>
Fri, 2 May 2025 08:03:15 +0000 (03:03 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Sat, 3 May 2025 10:59:48 +0000 (05:59 -0500)
commit5a3a4f73476580b44442a30c8404a62b5055c96d
tree2566afa3d0230d963d87e56440f4692408e7405c
parent69def105c04303de554a6e36f88798c33381efc2
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>
src/osd/scrubber/osd_scrub.cc
src/osd/scrubber/osd_scrub.h