btrfs: don't use async helpers for crcs when under IO limits

We want to avoid priority inversions from btrfs' async helpers when
using cgroups to control IO.  The least complicated way is to avoid
the async helpers completely when we're not in the root cgroup for IO.

On modern hardware with crc32c acceleration, this has a very small
impact, but we want to do more benchmarks to make sure.

Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
1 file changed