I recently ran into a situation where defrag and scrub were running simultaneously, which brought my entire system to a grinding halt. Looking into it, I see that btrfs-defrag.sh does not use run_task, which means it doesn't respect the setting of BTRFS_ALLOW_CONCURRENCY. From a cursory look at the code, I assume fixing this is as simple as adding run_task on line 30.
I recently ran into a situation where defrag and scrub were running simultaneously, which brought my entire system to a grinding halt. Looking into it, I see that
btrfs-defrag.sh
does not userun_task
, which means it doesn't respect the setting of BTRFS_ALLOW_CONCURRENCY. From a cursory look at the code, I assume fixing this is as simple as addingrun_task
on line 30.