From patchwork Fri May 26 20:44:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sargun Dhillon X-Patchwork-Id: 9751261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD7866032C for ; Sat, 27 May 2017 01:10:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE6D1284E3 for ; Sat, 27 May 2017 01:10:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCD1D284B5; Sat, 27 May 2017 01:10:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DBD2284E3 for ; Sat, 27 May 2017 01:10:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594AbdE0BKS (ORCPT ); Fri, 26 May 2017 21:10:18 -0400 Received: from mail-io0-f181.google.com ([209.85.223.181]:36063 "EHLO mail-io0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S944933AbdEZUox (ORCPT ); Fri, 26 May 2017 16:44:53 -0400 Received: by mail-io0-f181.google.com with SMTP id o12so16137346iod.3 for ; Fri, 26 May 2017 13:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sargun.me; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=b6RNUvkJdwZ8PRZpeEV7HB55vrU/TiCKkpKZiXxejac=; b=A6Tk2kKAC7E4Vb5HNq/dhQPmYbQJT+SrFeuoUYe/Cm11i4N8qkuq+/rV6/RmOCX8Ce qkOLOf8jRX5aAiBy9K86y+MZD872tvwQrA4dYqa+7UsE/2uL+FI79PoVjlFpfJ+f7YtO 9LI/9Zqz8DI6DvEZgQNYE+N2BkoHMr8NbA560= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=b6RNUvkJdwZ8PRZpeEV7HB55vrU/TiCKkpKZiXxejac=; b=bdraEjJBptqo2imLDa1nW6iq5CjBZ11Ck1vVngKDzK6oxz8rYCWfWRAJRvRdbENy4g qhgYReqvo6Y1iALYkjWRs6dfPjCMbo+zdTF20d8QY/SDRj5Wf57U4O/JPCfKdR/aV8Ug 9cCoE5y3+yyWetl671CoBJsT6MralCvE7HWcMRP4egrXegrv1JWgRBYhmhRvYU/CQh5j pMnw7VwJJItJiD8Tqh12djlmmlnSJeqOn/a9LucAlhOf/k35tyAaaJKLUSHfBGY8e7bO dTNt7MTJlfkmdByxJ5aImb+CIzLjep5RGgWahtWfEgspJKla3J0nOu7p9u9cc7tLdy/E 8aXg== X-Gm-Message-State: AODbwcDDPyeu1vD6jlLqstWwnp7IAjj9PwGkQfDmoK9rviLCISA3E5GP L/hM79G+qAu+ELoBsuo/Iw== X-Received: by 10.107.142.212 with SMTP id q203mr3658814iod.207.1495831492212; Fri, 26 May 2017 13:44:52 -0700 (PDT) Received: from ircssh-2.c.rugged-nimbus-611.internal (80.60.198.104.bc.googleusercontent.com. [104.198.60.80]) by smtp.gmail.com with ESMTPSA id 67sm757726ioc.27.2017.05.26.13.44.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 May 2017 13:44:52 -0700 (PDT) Date: Fri, 26 May 2017 20:44:50 +0000 From: Sargun Dhillon To: linux-btrfs@vger.kernel.org Cc: quwenruo@cn.fujitsu.com, mkh@rqc.ru Subject: [PATCH v2 3/4] btrfs: Warn the user when the legacy btrfs_qgroup_create API is used Message-ID: <20170526204449.GA18209@ircssh-2.c.rugged-nimbus-611.internal> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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"); + ret = mnt_want_write_file(file); if (ret) return ret;