Re: [PATCH v2 3/4] btrfs: Warn the user when the legacy btrfs_qgroup_create API is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 26, 2017 at 08:44:50PM +0000, Sargun Dhillon wrote:
> This patch adds a warning to let the user know when the legacy
> qgroup creation / removal API is in use. Eventually, we can
> deprecate this API.
> 
> Signed-off-by: Sargun Dhillon <sargun@xxxxxxxxx>
> ---
>  fs/btrfs/ioctl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index 78c8321..fba409f 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -5027,6 +5027,8 @@ static long btrfs_ioctl_qgroup_create(struct file *file, void __user *arg)
>  	if (!capable(CAP_SYS_ADMIN))
>  		return -EPERM;
>  
> +	pr_info_once("btrfs: Usage of deprecated btrfs_qgroup_create ioctl\n");

Would be better to use the btrfs_info helper otherwise the user does not
know on which filesystem it happened.

Deprecation of v1 makes sense but the ioctl must stay anyway, similar to
other v1/v2 ioctls that we have. In long-term and long-living distros,
the applications probably use the deprecated interfaces so the syslog
message causes noise. I'd first document the deprecation and add a real
warning in a few releases maybe.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux