diff options
author | David Sterba <dsterba@suse.com> | 2016-02-15 18:15:21 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-04-28 10:59:13 +0200 |
commit | 735654ea91a06a30bfe05fdfd09c8895abf6c1bf (patch) | |
tree | d49c49b532338f20c636221fb6e160e2f2df18d9 /fs/btrfs/ioctl.c | |
parent | btrfs: rename btrfs_find_device_by_user_input (diff) | |
download | linux-735654ea91a06a30bfe05fdfd09c8895abf6c1bf.tar.xz linux-735654ea91a06a30bfe05fdfd09c8895abf6c1bf.zip |
btrfs: rename flags for vol args v2
Rename BTRFS_DEVICE_BY_ID so it's more descriptive that we specify the
device by id, it'll be part of the public API. The mask of supported
flags is also renamed, only for internal use.
The error code for unknown flags is EOPNOTSUPP, fixed.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 7cf0f6328d99..65903ec5e1c0 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2687,8 +2687,8 @@ static long btrfs_ioctl_rm_dev_v2(struct file *file, void __user *arg) } /* Check for compatibility reject unknown flags */ - if (vol_args->flags & ~BTRFS_VOL_ARG_V2_FLAGS) - return -ENOTTY; + if (vol_args->flags & ~BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED) + return -EOPNOTSUPP; if (atomic_xchg(&root->fs_info->mutually_exclusive_operation_running, 1)) { @@ -2697,7 +2697,7 @@ static long btrfs_ioctl_rm_dev_v2(struct file *file, void __user *arg) } mutex_lock(&root->fs_info->volume_mutex); - if (vol_args->flags & BTRFS_DEVICE_BY_ID) { + if (vol_args->flags & BTRFS_DEVICE_SPEC_BY_ID) { ret = btrfs_rm_device(root, NULL, vol_args->devid); } else { vol_args->name[BTRFS_SUBVOL_NAME_MAX] = '\0'; @@ -2707,7 +2707,7 @@ static long btrfs_ioctl_rm_dev_v2(struct file *file, void __user *arg) atomic_set(&root->fs_info->mutually_exclusive_operation_running, 0); if (!ret) { - if (vol_args->flags & BTRFS_DEVICE_BY_ID) + if (vol_args->flags & BTRFS_DEVICE_SPEC_BY_ID) btrfs_info(root->fs_info, "device deleted: id %llu", vol_args->devid); else |