On Mon, Nov 09, 2020 at 11:24:19AM -0800, Darrick J. Wong wrote:
> On Mon, Nov 09, 2020 at 08:10:08PM +0100, Michal Suchanek wrote:
> > xfs accepts both dax and dax_enum but shows only dax_enum. Show both
> > options.
> >
> > Fixes: 8d6c3446ec23 ("fs/xfs: Make DAX mount option a tri-state")
> > Signed-off-by: Michal Suchanek <[email protected]>
> > ---
> > fs/xfs/xfs_super.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> > index e3e229e52512..a3b00003840d 100644
> > --- a/fs/xfs/xfs_super.c
> > +++ b/fs/xfs/xfs_super.c
> > @@ -163,7 +163,7 @@ xfs_fs_show_options(
> > { XFS_MOUNT_GRPID, ",grpid" },
> > { XFS_MOUNT_DISCARD, ",discard" },
> > { XFS_MOUNT_LARGEIO, ",largeio" },
> > - { XFS_MOUNT_DAX_ALWAYS, ",dax=always" },
> > + { XFS_MOUNT_DAX_ALWAYS, ",dax,dax=always" },
>
> NAK, programs that require DAX semantics for files stored on XFS must
> call statx to detect the STATX_ATTR_DAX flag, as outlined in "Enabling
> DAX on xfs" in Documentation/filesystems/dax.txt.
statx can be used to query S_DAX. NOTE that only regular files will
ever have S_DAX set and therefore statx will never indicate that S_DAX
is set on directories.
The filesystem may not have any files so statx cannot be used.
If you reject this method of detection please provide an actual usable
alternative.
Thanks
Michal
>
> --D
>
> > { XFS_MOUNT_DAX_NEVER, ",dax=never" },
> > { 0, NULL }
> > };
> > --
> > 2.26.2
> >