linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: torvalds@linux-foundation.org,
	Miklos Szeredi <mszeredi@redhat.com>,
	Ira Weiny <ira.weiny@intel.com>,
	David Howells <dhowells@redhat.com>,
	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>
Subject: Re: [PATCH 1/2] uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT
Date: Tue, 1 Dec 2020 09:32:13 -0800	[thread overview]
Message-ID: <20201201173213.GH143045@magnolia> (raw)
In-Reply-To: <7027520f-7c79-087e-1d00-743bdefa1a1e@redhat.com>

On Tue, Dec 01, 2020 at 10:57:11AM -0600, Eric Sandeen wrote:
> 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.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>  include/uapi/linux/stat.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h
> index 82cc58fe9368..9ad19eb9bbbf 100644
> --- a/include/uapi/linux/stat.h
> +++ b/include/uapi/linux/stat.h
> @@ -171,9 +171,10 @@ 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 inode is currently
> + * DAX-enabled, not simply that the per-inode flag has been set.

I don't really like using "DAX-enabled" to define "DAX attribute".  How
about cribbing from the statx manpage?

"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 +184,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			0x00400000 /* File is currently DAX-enabled */

Why not use the next bit in the series (0x200000)?  Did someone already
claim it in for-next?

--D

>  
>  
>  #endif /* _UAPI_LINUX_STAT_H */
> -- 
> 2.17.0
> 

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

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 16:54 [PATCH 0/2] statx: Fix DAX attribute collision and handling Eric Sandeen
2020-12-01 16:57 ` [PATCH 1/2] uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT Eric Sandeen
2020-12-01 17:32   ` Darrick J. Wong [this message]
2020-12-01 17:44     ` Eric Sandeen
2020-12-01 18:31       ` Andreas Dilger
2020-12-01 18:36         ` Eric Sandeen
2020-12-02  2:16   ` Ira Weiny
2020-12-02 20:42     ` Linus Torvalds
2020-12-03  2:45       ` Ira Weiny
2020-12-03 18:04         ` Linus Torvalds
2020-12-01 16:59 ` [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems Eric Sandeen
2020-12-01 17:39   ` Darrick J. Wong
2020-12-01 17:53     ` Eric Sandeen
2020-12-01 20:52     ` Dave Chinner
2020-12-01 22:03       ` Eric Sandeen
2020-12-01 22:12         ` Linus Torvalds
2020-12-01 22:26           ` Eric Sandeen
2020-12-02  2:29             ` Ira Weiny
2020-12-02  8:03           ` Christoph Hellwig
2020-12-01 20:04   ` Linus Torvalds
2020-12-01 20:50     ` Eric Sandeen
2020-12-01 21:04   ` David Howells
2020-12-01 22:09     ` Linus Torvalds
2020-12-02  0:11       ` Eric Sandeen
2020-12-01 17:18 ` [PATCH 1/2] uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT David Howells
2020-12-01 17:20 ` [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems David Howells
2020-12-01 17:28 ` David Howells

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=20201201173213.GH143045@magnolia \
    --to=darrick.wong@oracle.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=sandeen@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).