aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2023-12-13 03:35:25 -0800
committerZorro Lang <zlang@kernel.org>2024-01-14 20:39:09 +0800
commit91cb623078b32ae1c6180ccd4098dbf776918220 (patch)
treebb9e947fe15f25feffdbe6361d11b1af6d3be625
parent81af9975ac4d5e6ad6e3c58ddf3c7452257f2992 (diff)
downloadxfstests-dev-91cb623078b32ae1c6180ccd4098dbf776918220.tar.gz
common: add _require_btrfs_free_space_tree
Reviewed-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rw-r--r--common/btrfs10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/btrfs b/common/btrfs
index 9dd2a7f49e..e1b29c6137 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