]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add ability to change features via sysfs
authorJeff Mahoney <jeffm@suse.com>
Fri, 1 Nov 2013 17:07:01 +0000 (13:07 -0400)
committerChris Mason <clm@fb.com>
Tue, 28 Jan 2014 21:19:27 +0000 (13:19 -0800)
commit67bedd78375f871fa7343fda07db4d532a8796e7
tree6d06a0adf2a6d4436e8ea3a381269f7b2cf565ab
parent17222eaf50785e5ec1d901d0f65e7996f224974c
btrfs: add ability to change features via sysfs

This patch adds the ability to change (set/clear) features while the file
system is mounted. A bitmask is added for each feature set for the
support to set and clear the bits. A message indicating which bit
has been set or cleared is issued when it's been changed and also when
permission or support for a particular bit has been denied.

Since the the attributes can now be writable, we need to introduce
another struct attribute to hold the different permissions.

If neither set or clear is supported, the file will have 0444 permissions.
If either set or clear is supported, the file will have 0644 permissions
and the store handler will filter out the write based on the bitmask.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/sysfs.c
fs/btrfs/sysfs.h