diff mbox series

[v7,03/10] common: add _require_btrfs_no_nodatacow helper

Message ID 877c3d18e5e3356570e77801212b83dde7ab41e4.1703838752.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 Dec. 29, 2023, 12:22 p.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