1
0
mirror of https://github.com/Zygo/bees.git synced 2025-07-01 16:22:27 +02:00

extent scan: extra check to make sure no Tasks are started when throttled

Previously `scan()` would run the extent scan loop once, and enqueue one
extent, before checking for throttling.  Do an extra check before that,
and bail out so that zero extents are enqueued when throttled.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell
2025-02-17 20:02:18 -05:00
parent ef9b4b3a50
commit 9439dad93a

View File

@ -899,6 +899,9 @@ BeesScanModeExtent::scan()
{
BEESTRACE("bsm scan");
// Do nothing if we are throttled
if (should_throttle()) return;
unique_lock<mutex> lock(m_mutex);
const auto size_tiers_copy = m_size_tiers;
lock.unlock();