From c5868f8362f5620302c66848d400368f8d4b45f8 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 17 Feb 2016 15:24:14 +0100 Subject: btrfs: add GET_SUPPORTED_FEATURES to the control device ioctls The control device is accessible when no filesystem is mounted and we may want to query features supported by the module. This is already possible using the sysfs files, this ioctl is for parity and convenience. Reviewed-by: Anand Jain Signed-off-by: David Sterba --- fs/btrfs/super.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs/btrfs/super.c') diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d41e09fe8e38..dda6f64dfd73 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2163,6 +2163,10 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd, break; ret = !(fs_devices->num_devices == fs_devices->total_devices); break; + case BTRFS_IOC_GET_SUPPORTED_FEATURES: + ret = btrfs_ioctl_get_supported_features(NULL, + (void __user*)arg); + break; } kfree(vol); -- cgit 1.4.1