From: Johannes Thumshirn Date: Wed, 13 Dec 2023 11:35:25 +0000 (-0800) Subject: common: add _require_btrfs_free_space_tree X-Git-Tag: v2024.01.14~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=91cb623078b32ae1c6180ccd4098dbf776918220;p=xfstests-dev.git common: add _require_btrfs_free_space_tree Reviewed-by: Filipe Manana Reviewed-by: Anand Jain Signed-off-by: Johannes Thumshirn Signed-off-by: Anand Jain Signed-off-by: Zorro Lang --- diff --git a/common/btrfs b/common/btrfs index 9dd2a7f4..e1b29c61 100644 --- a/common/btrfs +++ b/common/btrfs @@ -127,6 +127,16 @@ _require_btrfs_no_nodatacow() fi } +_require_btrfs_free_space_tree() +{ + _scratch_mkfs > /dev/null 2>&1 + if ! $BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV | \ + grep -q "FREE_SPACE_TREE" + then + _notrun "This test requires a free-space-tree" + fi +} + _check_btrfs_filesystem() { device=$1