diff mbox series

[v4,3/8] common: add _require_btrfs_no_nodatacow helper

Message ID 20231206-btrfs-raid-v4-3-578284dd3a70@wdc.com (mailing list archive)
State New, archived
Headers show
Series fstests: add tests for btrfs' raid-stripe-tree feature | expand

Commit Message

Johannes Thumshirn Dec. 6, 2023, 10:56 a.m. UTC
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 common/btrfs | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/common/btrfs b/common/btrfs
index e3ccb4fa07d4..bf69bcee158b 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
+}
+
 _require_btrfs_no_block_group_tree()
 {
 	_scratch_mkfs > /dev/null 2>&1