Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1679149pxu; Sun, 6 Dec 2020 03:49:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvcAZbeEr/uedqzxqI6Ql7rZ+JKcnT/QhrMdVpiFGjojpfLdddb1s5o9wHqKBkUUDgndtC X-Received: by 2002:aa7:d3cc:: with SMTP id o12mr16132898edr.235.1607255352523; Sun, 06 Dec 2020 03:49:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255352; cv=none; d=google.com; s=arc-20160816; b=Zw3qsprI7JXNdrgi2nRkKoJvKYI+tReKC4F8i/ZZLa07SnvqxgaxCc4aempqijeeZW 2vCRqabH+RNNjIYskllAjFDoERVRfbfkXYSxlbAMvOQwB271cbsRfufNxc56fSZ8jXOK XSnzJVtadkhVd53KMGCj94ZTWAOsUG6Md9M9OFF4yO90bumRcHjjsdp6BBFaNARr7HfF 3eUjM3zbMmNH3Kx/f2iz745UU891JXC6cj6NolCFyfmAbrdkxEwqQk6YDVZEO13+LvPG cB4dswwSC6HCLF1ee4tEIyAmfgjaE5rK/Y+MHvHtPxhbte53qBVEyiCY5B6hKJo7V0cN sNoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=p6voHUfvefe5nKiIt3i6pRQdU8F5OOE3Wjcw0QZnNoI=; b=i+aJAl3yC1tKCnMqVWr5H1F2XNS5riO81fOF+Z9obvol8C73IIHUUtRaOCcvTG6tCZ I9wb9lHI+yvstpewdl3bDtLoWWF3THxLz6ALIeymPxONCu1WCjbaMmBsbE69kfhnnrsY rkmNbWFLMPedDDIOLC9vteToxZXZqMQjiLyKXGKBpa5E41IpRz+Y9lcXnsafJH19sWj+ gmVGEAwh0juZlqNVGvQZedCndw7W/gc+zTQsKQAWmmsuWvAyek74vC93O0jiIfA876nV K7+36Py6KS4UUWtsavZI+s1FFR0kO2UfZLyUq7Un5VoH4CsXYpXEkymhohlpOeRWEN+N JIeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a13si6640255edq.317.2020.12.06.03.48.49; Sun, 06 Dec 2020 03:49:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729654AbgLFLqW (ORCPT + 99 others); Sun, 6 Dec 2020 06:46:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:46658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728900AbgLFLqR (ORCPT ); Sun, 6 Dec 2020 06:46:17 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Eric Sandeen , "Darrick J. Wong" , Christoph Hellwig , Ira Weiny , Linus Torvalds Subject: [PATCH 5.9 45/46] uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT Date: Sun, 6 Dec 2020 12:17:53 +0100 Message-Id: <20201206111558.632024362@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111556.455533723@linuxfoundation.org> References: <20201206111556.455533723@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Sandeen commit 72d1249e2ffdbc344e465031ec5335fa3489d62e upstream. STATX_ATTR_MOUNT_ROOT and STATX_ATTR_DAX got merged with the same value, so one of them needs fixing. Move STATX_ATTR_DAX. While we're in here, clarify the value-matching scheme for some of the attributes, and explain why the value for DAX does not match. Fixes: 80340fe3605c ("statx: add mount_root") Fixes: 712b2698e4c0 ("fs/stat: Define DAX statx attribute") Link: https://lore.kernel.org/linux-fsdevel/7027520f-7c79-087e-1d00-743bdefa1a1e@redhat.com/ Link: https://lore.kernel.org/lkml/20201202214629.1563760-1-ira.weiny@intel.com/ Reported-by: David Howells Signed-off-by: Eric Sandeen Reviewed-by: David Howells Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Ira Weiny Cc: # 5.8 Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/uapi/linux/stat.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/include/uapi/linux/stat.h +++ b/include/uapi/linux/stat.h @@ -171,9 +171,12 @@ struct statx { * be of use to ordinary userspace programs such as GUIs or ls rather than * specialised tools. * - * Note that the flags marked [I] correspond to generic FS_IOC_FLAGS + * Note that the flags marked [I] correspond to the FS_IOC_SETFLAGS flags * semantically. Where possible, the numerical value is picked to correspond - * also. + * also. Note that the DAX attribute indicates that the file is in the CPU + * direct access state. It does not correspond to the per-inode flag that + * some filesystems support. + * */ #define STATX_ATTR_COMPRESSED 0x00000004 /* [I] File is compressed by the fs */ #define STATX_ATTR_IMMUTABLE 0x00000010 /* [I] File is marked immutable */ @@ -183,7 +186,7 @@ struct statx { #define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount trigger */ #define STATX_ATTR_MOUNT_ROOT 0x00002000 /* Root of a mount */ #define STATX_ATTR_VERITY 0x00100000 /* [I] Verity protected file */ -#define STATX_ATTR_DAX 0x00002000 /* [I] File is DAX */ +#define STATX_ATTR_DAX 0x00200000 /* File is currently in DAX state */ #endif /* _UAPI_LINUX_STAT_H */