]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs/237: Use zone cap instead of zone size in fill_size and rest calculation
authorPankaj Raghav <p.raghav@samsung.com>
Fri, 25 Mar 2022 10:19:08 +0000 (11:19 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 10 Apr 2022 15:39:16 +0000 (23:39 +0800)
commit9577dac5d24f5b57ae1c4fbb960ebac05a233063
tree31ff36bb1c353b4431901e69a8e7451c9d71da95
parenta7e2b797f865831fcb883d15e06c2c17246caed8
btrfs/237: Use zone cap instead of zone size in fill_size and rest calculation

This test will break when zone capacity != zone size because the
calculation of the size to be filled is done using zone_size instead
of the actual capacity available per zone. Fix it by using zone
capacity.

As a zoned device can have variable capacity, use the btrfs utility
to get the zone capacity from the first data block group that the
test will be performed on.

The support to extract zone capacity was added to blkzone only from
version 2.37. So zcap will be used only when the blkzone version is
greater or equal to 2.37.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/filter
tests/btrfs/237