kdave / btrfsmaintenance

Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag on selected mountpoints or directories.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

btrfs-defrag.sh should respect BTRFS_ALLOW_CONCURRENCY

DarwinAwardWinner opened this issue · comments

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.