Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-02 Thread Christoph Hellwig
On Tue, Dec 01, 2020 at 02:12:19PM -0800, Linus Torvalds wrote: > On Tue, Dec 1, 2020 at 2:03 PM Eric Sandeen wrote: > > > > That's why I was keen to just add DAX unconditionally at this point, and if > > we want > > to invent/refine meanings for the mask, we can still try to do that? > > Oh God

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Ira Weiny
On Tue, Dec 01, 2020 at 04:26:43PM -0600, Eric Sandeen wrote: > On 12/1/20 4:12 PM, Linus Torvalds wrote: > > On Tue, Dec 1, 2020 at 2:03 PM Eric Sandeen wrote: > >> > >> That's why I was keen to just add DAX unconditionally at this point, and > >> if we want > >> to invent/refine meanings for th

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Eric Sandeen
On 12/1/20 4:09 PM, Linus Torvalds wrote: > So basically, the thing that argues against this patch is that it > seems to just duplicate things inside filesystems, when the VFS layter > already has the information. > > Now, if the VFS information was possibly stale or wrong, that woudl be > one thi

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Eric Sandeen
On 12/1/20 4:12 PM, Linus Torvalds wrote: > On Tue, Dec 1, 2020 at 2:03 PM Eric Sandeen wrote: >> >> That's why I was keen to just add DAX unconditionally at this point, and if >> we want >> to invent/refine meanings for the mask, we can still try to do that? > > Oh Gods. Let's *not* make this

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Linus Torvalds
On Tue, Dec 1, 2020 at 2:03 PM Eric Sandeen wrote: > > That's why I was keen to just add DAX unconditionally at this point, and if > we want > to invent/refine meanings for the mask, we can still try to do that? Oh Gods. Let's *not* make this some "random filesystem choice" where now semantics

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Linus Torvalds
On Tue, Dec 1, 2020 at 1:04 PM David Howells wrote: > > Linus Torvalds wrote: > > > And if IS_DAX() is correct, then why shouldn't this just be done in > > generic code? Why move it to every individual filesystem? > > One way of looking at it is that the check is then done for every filesystem -

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Eric Sandeen
On 12/1/20 2:52 PM, Dave Chinner wrote: > On Tue, Dec 01, 2020 at 09:39:05AM -0800, Darrick J. Wong wrote: >> On Tue, Dec 01, 2020 at 10:59:36AM -0600, Eric Sandeen wrote: >>> It's a bit odd to set STATX_ATTR_DAX into the statx attributes in the VFS; >>> while the VFS can detect the current DAX

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread David Howells
Linus Torvalds wrote: > And if IS_DAX() is correct, then why shouldn't this just be done in > generic code? Why move it to every individual filesystem? One way of looking at it is that the check is then done for every filesystem - most of which don't support it. Not sure whether that's a big en

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Dave Chinner
On Tue, Dec 01, 2020 at 09:39:05AM -0800, Darrick J. Wong wrote: > On Tue, Dec 01, 2020 at 10:59:36AM -0600, Eric Sandeen wrote: > > It's a bit odd to set STATX_ATTR_DAX into the statx attributes in the VFS; > > while the VFS can detect the current DAX state, it is the filesystem which > > actually

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Eric Sandeen
On 12/1/20 2:04 PM, Linus Torvalds wrote: > On Tue, Dec 1, 2020 at 8:59 AM Eric Sandeen wrote: >> >> It's a bit odd to set STATX_ATTR_DAX into the statx attributes in the VFS; >> while the VFS can detect the current DAX state, it is the filesystem which >> actually sets S_DAX on the inode, and the

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Linus Torvalds
On Tue, Dec 1, 2020 at 8:59 AM Eric Sandeen wrote: > > It's a bit odd to set STATX_ATTR_DAX into the statx attributes in the VFS; > while the VFS can detect the current DAX state, it is the filesystem which > actually sets S_DAX on the inode, and the filesystem is the place that > knows whether DA

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Eric Sandeen
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; >>

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread Darrick J. Wong
On Tue, Dec 01, 2020 at 10:59:36AM -0600, Eric Sandeen wrote: > It's a bit odd to set STATX_ATTR_DAX into the statx attributes in the VFS; > while the VFS can detect the current DAX state, it is the filesystem which > actually sets S_DAX on the inode, and the filesystem is the place that > knows wh

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread David Howells
David Howells wrote: > > - if (IS_DAX(inode)) > > - stat->attributes |= STATX_ATTR_DAX; > > - > > This could probably be left in and not distributed amongst the filesytems > provided that any filesystem that might turn it on sets the bit in the > attributes_mask. On further consider

Re: [PATCH 2/2] statx: move STATX_ATTR_DAX attribute handling to filesystems

2020-12-01 Thread David Howells
Eric Sandeen wrote: > - if (IS_DAX(inode)) > - stat->attributes |= STATX_ATTR_DAX; > - This could probably be left in and not distributed amongst the filesytems provided that any filesystem that might turn it on sets the bit in the attributes_mask. I'm presuming that the core do