btrfs: Deprecate BTRFS_IOC_BALANCE ioctl
PATCH 1/1 btrfs: Deprecate BTRFS_IOC_BALANCE ioctl
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.
--- fs/btrfs/ioctl.c | 3 +++ 1 file changed, 3 insertions(+)
fs/btrfs/ioctl.c +3 -0
@@ -4013,6 +4013,9 @@ 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,"BTRFS_IOC_BALANCE ioctl is deprecated and will be removed in kernel 5.18" ); +if (!capable (CAP_SYS_ADMIN ))return -EPERM ;
Signature · 1 line
2.25.1
Quoted 5 lines · Nikolay Borisov
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.
Signed-off-by Nikolay Borisov <[email protected]>
Thanks,
Josef
Quoted 3 lines · Nikolay Borisov
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.
Agreed. I maybe put this patch to the 5.16 queue, there's not much reason to delay it and it's not a functional change.
Quoted 5 lines · Nikolay Borisov
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.
Signed-off-by Nikolay Borisov <[email protected]>
fs/btrfs/ioctl.c static long btrfs_ioctl_balance(struct file *file, void __user *arg) · line 4018
Quoted 3 lines
fs/btrfs/ioctl.c +3
-0+if (!arg) +btrfs_warn (fs_info,"BTRFS_IOC_BALANCE ioctl is deprecated and will be removed in kernel 5.18" ); +
Nit:
Needs proper formatting, split into two lines, adjust the indent if still longer than 80 char.
Thanks, Anand
Quoted 5 lines · Nikolay Borisov
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.
Signed-off-by Nikolay Borisov <[email protected]>
Added to misc-next with slight reformatting of the message, thanks.