diff mbox series

btrfs: Deprecate BTRFS_IOC_BALANCE ioctl

Message ID 20211110114104.1140727-1-nborisov@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs: Deprecate BTRFS_IOC_BALANCE ioctl | expand

Commit Message

Nikolay Borisov Nov. 10, 2021, 11:41 a.m. UTC
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(+)

Comments

Josef Bacik Nov. 10, 2021, 2:06 p.m. UTC | #1
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
David Sterba Nov. 10, 2021, 3:24 p.m. UTC | #2
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.
Anand Jain Nov. 10, 2021, 7:11 p.m. UTC | #3
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
David Sterba Nov. 11, 2021, 11:36 a.m. UTC | #4
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 mbox series

Patch

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;