linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: torvalds@linux-foundation.org,
	Miklos Szeredi <mszeredi@redhat.com>,
	Ira Weiny <ira.weiny@intel.com>,
	David Howells <dhowells@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-man@vger.kernel.org,
	linux-kernel@vger.kernel.org, xfs <linux-xfs@vger.kernel.org>,
	linux-ext4@vger.kernel.org, Xiaoli Feng <xifeng@redhat.com>,
	Eric Sandeen <sandeen@redhat.com>
Subject: [PATCH V2] uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT
Date: Tue, 1 Dec 2020 17:21:40 -0600	[thread overview]
Message-ID: <3e28d2c7-fbe5-298a-13ba-dcd8fd504666@redhat.com> (raw)

[*] Note: This needs to be merged as soon as possible as it's introducing an incompatible UAPI change...

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")
Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
---
V2: Change flag value per Darrick Wong
    Tweak comment per Darrick Wong
    Add Fixes: tags & reported-by & RVB per dhowells

 include/uapi/linux/stat.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h
index 82cc58fe9368..1500a0f58041 100644
--- 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 */
-- 
2.17.0


             reply	other threads:[~2020-12-01 23:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 23:21 Eric Sandeen [this message]
2020-12-02  4:18 ` [PATCH V2] uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT Darrick J. Wong
2020-12-02  8:06 ` Christoph Hellwig
2020-12-02 16:00 ` Ira Weiny
2020-12-02 16:18   ` Miklos Szeredi
2020-12-02 16:23   ` David Howells
2020-12-02 17:41     ` Miklos Szeredi
2020-12-02 19:06       ` Greg Kroah-Hartman
2020-12-02 20:40         ` Dave Chinner
2020-12-02 21:04           ` Greg Kroah-Hartman
2020-12-03  1:50             ` Dave Chinner
2020-12-03  6:18             ` Amir Goldstein
2020-12-04 16:02               ` Theodore Y. Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e28d2c7-fbe5-298a-13ba-dcd8fd504666@redhat.com \
    --to=sandeen@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=xifeng@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).