mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-30 11:56:31 -05:00
set_threads read _threads.size() under _threads_mutex then read _remove_count outside the lock. Between the two reads a worker could claim a _remove_count decrement and erase itself from _threads via _remove_self, causing set_threads to double-count that shrink: once from the reduced _threads.size() (had the lock been re-acquired) and once from the stale _remove_count that was already claimed. This could cause a spurious over-shrink and a -EINVAL return even though the pool was at the target size. Move the _remove_count load inside the _threads_mutex scope so both values are read atomically with respect to worker self-removal. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| acutest | ||
| boost | ||
| CLI11 | ||
| fmt | ||
| khash | ||
| libfuse | ||
| nonstd | ||
| rapidhash | ||
| scope_guard | ||
| subprocess | ||