On Fri, Apr 24, 2020 at 08:35:31AM +1000, Dave Chinner wrote: > On Wed, Apr 22, 2020 at 02:20:57PM -0700, ira.weiny@xxxxxxxxx wrote: > > From: Ira Weiny <ira.weiny@xxxxxxxxx> > > > > As agreed upon[1]. We make the dax mount option a tri-state. '-o dax' > > continues to operate the same. We add 'always', 'never', and 'inode' > > (default). > > > > [1] https://lore.kernel.org/lkml/20200405061945.GA94792@xxxxxxxxxxxxxxxxxxxxxxxxx/ > > > > Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx> > .... > > @@ -129,7 +163,6 @@ xfs_fs_show_options( > > { XFS_MOUNT_GRPID, ",grpid" }, > > { XFS_MOUNT_DISCARD, ",discard" }, > > { XFS_MOUNT_LARGEIO, ",largeio" }, > > - { XFS_MOUNT_DAX_ALWAYS, ",dax" }, > > { 0, NULL } > > }; > > struct xfs_mount *mp = XFS_M(root->d_sb); > > @@ -185,6 +218,11 @@ xfs_fs_show_options( > > if (!(mp->m_qflags & XFS_ALL_QUOTA_ACCT)) > > seq_puts(m, ",noquota"); > > > > + if (mp->m_flags & XFS_MOUNT_DAX_ALWAYS) > > + seq_puts(m, ",dax=always"); > > + else if (mp->m_flags & XFS_MOUNT_DAX_NEVER) > > + seq_puts(m, ",dax=never"); > > These can never be set at the same time, so please put these in the > m_flags options table as XFS_MOUNT_DAX_ALWAYS already is. i.e. > > @@ -129,7 +163,8 @@ xfs_fs_show_options( > { XFS_MOUNT_GRPID, ",grpid" }, > { XFS_MOUNT_DISCARD, ",discard" }, > { XFS_MOUNT_LARGEIO, ",largeio" }, > - { XFS_MOUNT_DAX_ALWAYS, ",dax" }, > + { XFS_MOUNT_DAX_ALWAYS, ",dax=always" }, > + { XFS_MOUNT_DAX_NEVER, ",dax=never" }, > { 0, NULL } > }; > struct xfs_mount *mp = XFS_M(root->d_sb); > > Otherwise looks OK. Done. Ira > > -Dave. > -- > Dave Chinner > david@xxxxxxxxxxxxx