Skip to content

Commit 6c405b2

Browse files
lorddoskiaskdave
authored andcommitted
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. 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]>
1 parent d08e38b commit 6c405b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/btrfs/ioctl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3986,6 +3986,10 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg)
39863986
bool need_unlock; /* for mut. excl. ops lock */
39873987
int ret;
39883988

3989+
if (!arg)
3990+
btrfs_warn(fs_info,
3991+
"IOC_BALANCE ioctl (v1) is deprecated and will be removed in kernel 5.18");
3992+
39893993
if (!capable(CAP_SYS_ADMIN))
39903994
return -EPERM;
39913995

0 commit comments

Comments
 (0)