linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.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 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems
Date: Tue, 1 Dec 2020 11:53:42 -0600	[thread overview]
Message-ID: <98503625-d40e-78d7-334b-5fa5ff06045e@redhat.com> (raw)
In-Reply-To: <20201201173905.GI143045@magnolia>

On 12/1/20 11:39 AM, Darrick J. Wong wrote:
>> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
>> index 1414ab79eacf..56deda7042fd 100644
>> --- a/fs/xfs/xfs_iops.c
>> +++ b/fs/xfs/xfs_iops.c
>> @@ -575,10 +575,13 @@ xfs_vn_getattr(
>>  		stat->attributes |= STATX_ATTR_APPEND;
>>  	if (ip->i_d.di_flags & XFS_DIFLAG_NODUMP)
>>  		stat->attributes |= STATX_ATTR_NODUMP;
>> +	if (IS_DAX(inode))
>> +		stat->attributes |= STATX_ATTR_DAX;
>>  
>>  	stat->attributes_mask |= (STATX_ATTR_IMMUTABLE |
>>  				  STATX_ATTR_APPEND |
>> -				  STATX_ATTR_NODUMP);
>> +				  STATX_ATTR_NODUMP |
>> +				  STATX_ATTR_DAX);
> TBH I preferred your previous iteration on this, which only set the DAX
> bit in the attributes_mask if the underlying storage was pmem and the
> blocksize was correct, etc. since it made it easier to distinguish
> between a filesystem where you /could/ have DAX (but it wasn't currently
> enabled) and a filesystem where it just isn't possible.
> 
> That might be enough to satisfy any critics who want to be able to
> detect DAX support from an installer program.

(nb: that previous iteration wasn't in public, just something I talked to
Darrick about)

I'm sympathetic to that argument, but the exact details of what the mask means
in general, and for dax in particular, seems to be subject to ongoing debate.

I'd like to just set it with the simplest definition "the fileystem supports
the feature" for now, so that we aren't ever setting a feature that's omitted
from the mask, and refine the mask-setting for the dax flag in another
iteration if/when we reach agreement.

-Eric

> --D
> 


  reply	other threads:[~2020-12-01 17:55 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
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 [this message]
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=98503625-d40e-78d7-334b-5fa5ff06045e@redhat.com \
    --to=sandeen@redhat.com \
    --cc=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=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).