]> Git Repo - linux.git/commitdiff
btrfs: deprecate BTRFS_IOC_BALANCE ioctl
authorNikolay Borisov <[email protected]>
Wed, 10 Nov 2021 11:41:04 +0000 (13:41 +0200)
committerDavid Sterba <[email protected]>
Tue, 16 Nov 2021 15:51:19 +0000 (16:51 +0100)
The v2 balance ioctl has been introduced more than 9 years ago. Users of
the old v1 ioctl should have long been migrated to it. It's time we
deprecate it and eventually remove it.

The only known user is in btrfs-progs that tries v1 as a fallback in
case v2 is not supported. This is not necessary anymore.

Reviewed-by: Josef Bacik <[email protected]>
Reviewed-by: Anand Jain <[email protected]>
Signed-off-by: Nikolay Borisov <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
fs/btrfs/ioctl.c

index 92424a22d8d68f183abf792c9e4cddd63bbe1ae6..012fbfdfbebf29ff91e3dee2d9863e1e7e1d31e8 100644 (file)
@@ -3986,6 +3986,10 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg)
        bool need_unlock; /* for mut. excl. ops lock */
        int ret;
 
+       if (!arg)
+               btrfs_warn(fs_info,
+       "IOC_BALANCE ioctl (v1) is deprecated and will be removed in kernel 5.18");
+
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
 
This page took 0.047174 seconds and 4 git commands to generate.