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 <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2016-02-17 15:24:14 +01:00
parent 388f7b1d6e
commit c5868f8362
3 changed files with 6 additions and 2 deletions

View File

@@ -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);