diff mbox series

[v8,02/10] common: add _require_btrfs_no_nodatacow helper

Message ID 1cea3aa45d90904999866da86565528e45532109.1704344811.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series fstests: add tests for btrfs' raid-stripe-tree feature | expand

Commit Message

Anand Jain Jan. 4, 2024, 5:48 a.m. UTC
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>

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>
---
 common/btrfs | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/common/btrfs b/common/btrfs
index f91f8dd869a1..9dd2a7f49e16 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -120,6 +120,13 @@  _require_btrfs_no_compress()
 	fi
 }
 
+_require_btrfs_no_nodatacow()
+{
+	if _normalize_mount_options "$MOUNT_OPTIONS" | grep -q "nodatacow"; then
+		_notrun "This test requires no nodatacow enabled"
+	fi
+}
+
 _check_btrfs_filesystem()
 {
 	device=$1