Re: [PATCH 3/6 v3] common/btrfs: add helper _has_btrfs_sysfs_feature_attr

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]




+_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
+}

We already have _require_btrfs_fs_feature() to do exactly this.
Tried it in patch 5/6 and it works perfectly...

I noticed that. But, _require_btrfs_fs_feature() triggers _notrun()
when the feature is absent in the kernel. Given our need to run the
testcase with and without temp-fsid, it is not suitable.

Thanks, Anand





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux