With this helper, btrfs test cases can now check if a particular feature
is implemented in the kernel.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
_notrun "simple quotas not available"
_scratch_unmount
}
+
+_has_btrfs_sysfs_feature_attr()
+{
+ local feature_attr=$1
+
+ [ -z $feature_attr ] && \
+ _fail "Missing feature name argument for _has_btrfs_sysfs_attr"
+
+ modprobe btrfs &> /dev/null
+
+ test -e /sys/fs/btrfs/features/$feature_attr
+}