Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp179950ybb; Tue, 31 Mar 2020 20:27:35 -0700 (PDT) X-Google-Smtp-Source: APiQypJ0vc8UBN3hpsFnC7EGvXXTV3wfPW8fpbFv402KicjVp/EFwHRpxwUsgCsYWXhcUJlzTMEz X-Received: by 2002:aca:3386:: with SMTP id z128mr1466285oiz.40.1585711655742; Tue, 31 Mar 2020 20:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585711655; cv=none; d=google.com; s=arc-20160816; b=NZsNiE1lXs1Cj1Hs5+d3JiFpVhmMXWil3aSmWSag/GhXsLltkvSS3gcc/8p5BRhCwf tSUCGRTRLUdl8MioKip1M8oaSUfKxhQip9XvBsl6Y69Xi0ix/GN9VRLgG6ll0emofkZP lECSpj72pPOI4EmfPK435bm0yYiQH9EhC7cYAYG0Rcn32d5wmI3DUyx/oMdZ1cGTPObI H4DTPee+wgLnqb/O66wy2TSI/AhH/1W0z1wZPTb07+O8MFop+ph08+cI5fGwPx7OpPd0 CcR8M2dENme1YBQALVJCLsJlwUupNdgEc6VBI1ixmTvhH4C/iAbnW9B8OPbMTKcIUU56 X3XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=PnKmZsecfPV+baV27QWBqw+5G9m6xrl4SA6APZwxQl0=; b=JltA91IPp1byFiFz9UtPVNSkocSRfoZHoEoQUHJ0zmF9naXeq/P1TwTW/NvmxDPCwc u9k8cQtLijtrAGxntluz46Uq0NiyJ1bbBzxBOZ2iZTTej9oW5andlTOoN1Ano/KVDiOa 4MBHhbHFT972i/n6CxC5tr5oVPHu81yEXY/Gq4KgYZ6J9BGPsQOQM1ZniOQoIH3k+410 PM3KVuIsOtAcoj55GY8Z332CzVz8vRCAwMGkChQRlY5PzPVEuU/mEY5N5yc5IAZvRlTU CQVG/E27HUe5tgSVCJmd2B4gyqoWeEt5HS300rvcCCe9asyr+u4L6CUyMUIVWrRbz8VF sc0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=P6xfYEL1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si334633ots.150.2020.03.31.20.27.22; Tue, 31 Mar 2020 20:27:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=P6xfYEL1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731690AbgDAD0q (ORCPT + 99 others); Tue, 31 Mar 2020 23:26:46 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:32889 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731592AbgDAD0q (ORCPT ); Tue, 31 Mar 2020 23:26:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585711605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=PnKmZsecfPV+baV27QWBqw+5G9m6xrl4SA6APZwxQl0=; b=P6xfYEL1tmFVu8kcVb11J7GPidNyTQl4nxHjXayGm0erYFU67eujFx3K/LpVNqnohKDvJq Ag+qX6jBdP8S11irZ9mCukqZXqemp8EZDKVYHT4fk85pqe0zjAM+vL0c+9jq+XVPM3GgNx +V3Eh+yG7YFRssQ5+rgwfsZPalF6c64= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-479-FG66sx5nNjC05pwwMZPSoQ-1; Tue, 31 Mar 2020 23:26:43 -0400 X-MC-Unique: FG66sx5nNjC05pwwMZPSoQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 798F318B9FC1; Wed, 1 Apr 2020 03:26:41 +0000 (UTC) Received: from asgard.redhat.com (unknown [10.36.110.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E63715C1C5; Wed, 1 Apr 2020 03:26:38 +0000 (UTC) Date: Wed, 1 Apr 2020 05:26:50 +0200 From: Eugene Syromiatnikov To: linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, David Sterba , Nikolay Borisov Cc: Josef Bacik , Chris Mason , "Dmitry V. Levin" Subject: [PATCH] btrfs: re-instantiate the removed BTRFS_SUBVOL_CREATE_ASYNC definition Message-ID: <20200401032650.GA24378@asgard.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commit 9c1036fdb1d1ff1b ("btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC support") breaks strace build with the kernel headers from git: btrfs.c: In function "btrfs_test_subvol_ioctls": btrfs.c:531:23: error: "BTRFS_SUBVOL_CREATE_ASYNC" undeclared (first use in this function) vol_args_v2.flags = BTRFS_SUBVOL_CREATE_ASYNC; Moreover, it is improper to break UAPI anyway. Restore the macro definition and put it under "#ifndef __KERNEL__" in order to prevent inadvertent in-kernel usage. Fixes: 9c1036fdb1d1ff1b ("btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC support") Signed-off-by: Eugene Syromiatnikov --- include/uapi/linux/btrfs.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h index 8134924..e6b6cb0f 100644 --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h @@ -36,12 +36,10 @@ struct btrfs_ioctl_vol_args { #define BTRFS_DEVICE_PATH_NAME_MAX 1024 #define BTRFS_SUBVOL_NAME_MAX 4039 -/* - * Deprecated since 5.7: - * - * BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) - */ - +#ifndef __KERNEL__ +/* Deprecated since 5.7 */ +# define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) +#endif #define BTRFS_SUBVOL_RDONLY (1ULL << 1) #define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) -- 2.1.4