diff options
author | Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> | 2018-05-17 14:24:51 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 18:23:41 +0200 |
commit | f902bd3a5e19284698ce6d70209d316df15116c6 (patch) | |
tree | 77f138364506df9239eb71f990d9cdc37739ee17 /fs/btrfs/free-space-cache.h | |
parent | 6c52157fa9378efc0ff24c5f2602d500997f59db (diff) |
btrfs: sysfs: Add entry which shows if rmdir can work on subvolumes
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 a sysfs entry
/sys/fs/btrfs/features/rmdir_subvol
to indicate the availability of the feature so that a user program
(e.g. fstests) can detect it.
Prior to this commit, all entries in /sys/fs/btrfs/features are feature
which depend on feature bits of superblock (i.e. each feature affects
on-disk format) and managed by attribute_group "btrfs_feature_attr_group".
For each fs, entries in /sys/fs/btrfs/UUID/features indicate which
features are enabled (or can be changed online) for the fs.
However, rmdir_subvol feature only depends on kernel module. Therefore
new attribute_group "btrfs_static_feature_attr_group" is introduced and
sysfs_merge_group() is used to share /sys/fs/btrfs/features directory.
Features in "btrfs_static_feature_attr_group" won't be listed in each
/sys/fs/btrfs/UUID/features.
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.h')
0 files changed, 0 insertions, 0 deletions