On Tue, May 15, 2018 at 04:33:12PM +0900, Misono Tomohiro wrote: > Deletion of a subvolume by rmdir(2) has become allowed by the > 'commit cd2decf640b1 ("btrfs: Allow rmdir(2) to delete an empty > subvolume")'. > > It is a kind of new feature and this commits add new sysfs entry > /sys/fs/btrfs/features/rmdir_subvol > to indicate the feature. > > Since the behavior is independent of feature bits of superblock, > new type FEAT_KERNEL is added to struct btrfs_feature_set. > Features of FEAT_KERNEL is supposed to be visible only in /sys/fs/features > and not in /sys/fs/UUID/features.
As the rmdir_subvol is a static feature, depending only on the kernel version, it's not needed to use the same infrastructure as the optional features. It also makes it unnecesarily complicated, to distinguish the on-disk and kernel-only features and it's not a per-filesystem feature. It should be exported among btrfs_feature_attr_group and btrfs_supported_feature_attrs, possibly adding a new type of helpers if needed. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html