Message ID | 20211110114104.1140727-1-nborisov@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: Deprecate BTRFS_IOC_BALANCE ioctl | expand |
On Wed, Nov 10, 2021 at 01:41:04PM +0200, Nikolay Borisov wrote: > 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 <nborisov@suse.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Thanks, Josef
On Wed, Nov 10, 2021 at 01:41:04PM +0200, Nikolay Borisov wrote: > 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.
On 10/11/21 7:41 pm, Nikolay Borisov wrote: > 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 <nborisov@suse.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> > + 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
On Wed, Nov 10, 2021 at 01:41:04PM +0200, Nikolay Borisov wrote: > 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 <nborisov@suse.com> Added to misc-next with slight reformatting of the message, thanks.
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 238308f14474..dcf0772880b6 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -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;
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 <nborisov@suse.com> --- fs/btrfs/ioctl.c | 3 +++ 1 file changed, 3 insertions(+)