On Sat, Oct 02, 2021 at 09:11:19AM +0800, Qu Wenruo wrote: > But this makes me wonder, can we just leave scrub and balance exclusive? > There are already quite some limitations, like balance and send. > > Adding balance and scrub to be exclusive to each other shouldn't cause > too much hassle, and can remove these checks. This was suggested in the past in the btrfsmaintenance project, but rather for performance reasons. Some people run scrub and balance and let it finish when the time comes, so no perf concerns. As scrub is read-only the strict exclusion is not necessary as with send where it can lead to bugs. I'd like to keep it working as it is now, unless we find a stronger reason to make it exclusive. As eg. zoned now uses relocation on the background we'd have either scrub failing or bg reclaim not working. It's a trade off, there will be always some problematic case. Not allowing to do eg. a quick balance filter while scrub is running could be pretty annoying.