]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs: add a test case to verify scrub speed throttle works
authorQu Wenruo <wqu@suse.com>
Thu, 5 Jan 2023 07:18:19 +0000 (15:18 +0800)
committerZorro Lang <zlang@kernel.org>
Sat, 14 Jan 2023 13:41:42 +0000 (21:41 +0800)
commitb2188973c251871a0d3f02c6620fef909885b31a
tree17fae2a65b211319cd2baaeec738b005a46fe6cb
parente3774b281662d04a3cdab6c2eda2742a61854176
btrfs: add a test case to verify scrub speed throttle works

We introduced scrub speed throttle in commit eb3b50536642 ("btrfs: scrub:
per-device bandwidth control"),  but it is not that well documented
(e.g. what's the unit of the sysfs interface), nor tested by any test
case.

This patch will add a test case for this functionality.

The test case itself is pretty straightforward:

- Fill the fs with 2G file as scrub workload
- Scrub without any throttle to grab the initial speed
- Set the throttle to half of the initial speed
- Scrub again and check the speed against the throttle

The test case has an assumption that we can exclusively use all the
performance of the underlying disk.
But for cloud environment it's not ensured 100%, thus the test case is
not included in auto group to avoid false alerts.

[zlang: add auto group, remove useless comments]

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oralce.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/282 [new file with mode: 0755]
tests/btrfs/282.out [new file with mode: 0644]