All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: disable per-inode DAX flag
@ 2017-08-30 14:51 Christoph Hellwig
  2017-08-30 16:17 ` Darrick J. Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2017-08-30 14:51 UTC (permalink / raw)
  To: linux-xfs

Currently flag switching can be used to easily crash the kernel.  Disable
the per-inode DAX flag until that is sorted out.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_ioctl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 9c0c7a920304..06ca244c323a 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1008,11 +1008,12 @@ xfs_diflags_to_linux(
 		inode->i_flags |= S_NOATIME;
 	else
 		inode->i_flags &= ~S_NOATIME;
+#if 0	/* disabled until the flag switching races are sorted out */
 	if (xflags & FS_XFLAG_DAX)
 		inode->i_flags |= S_DAX;
 	else
 		inode->i_flags &= ~S_DAX;
-
+#endif
 }
 
 static int
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: disable per-inode DAX flag
  2017-08-30 14:51 [PATCH] xfs: disable per-inode DAX flag Christoph Hellwig
@ 2017-08-30 16:17 ` Darrick J. Wong
  2017-08-30 16:17   ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Darrick J. Wong @ 2017-08-30 16:17 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Wed, Aug 30, 2017 at 04:51:19PM +0200, Christoph Hellwig wrote:
> Currently flag switching can be used to easily crash the kernel.  Disable
> the per-inode DAX flag until that is sorted out.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/xfs/xfs_ioctl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index 9c0c7a920304..06ca244c323a 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -1008,11 +1008,12 @@ xfs_diflags_to_linux(
>  		inode->i_flags |= S_NOATIME;
>  	else
>  		inode->i_flags &= ~S_NOATIME;
> +#if 0	/* disabled until the flag switching races are sorted out */

#ifdef DEBUG ?

So that we developers can play with DAX without having to patch this out?

If that's fine with you I'll just change it on the way in.

--D

>  	if (xflags & FS_XFLAG_DAX)
>  		inode->i_flags |= S_DAX;
>  	else
>  		inode->i_flags &= ~S_DAX;
> -
> +#endif
>  }
>  
>  static int
> -- 
> 2.11.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: disable per-inode DAX flag
  2017-08-30 16:17 ` Darrick J. Wong
@ 2017-08-30 16:17   ` Christoph Hellwig
  2017-08-30 16:56     ` Darrick J. Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2017-08-30 16:17 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Christoph Hellwig, linux-xfs

On Wed, Aug 30, 2017 at 09:17:01AM -0700, Darrick J. Wong wrote:
> #ifdef DEBUG ?
> 
> So that we developers can play with DAX without having to patch this out?
> 
> If that's fine with you I'll just change it on the way in.

You can always mount with -o dax and get DAX support.  That's how
ext2/ext4 also work..

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: disable per-inode DAX flag
  2017-08-30 16:17   ` Christoph Hellwig
@ 2017-08-30 16:56     ` Darrick J. Wong
  0 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2017-08-30 16:56 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Wed, Aug 30, 2017 at 06:17:56PM +0200, Christoph Hellwig wrote:
> On Wed, Aug 30, 2017 at 09:17:01AM -0700, Darrick J. Wong wrote:
> > #ifdef DEBUG ?
> > 
> > So that we developers can play with DAX without having to patch this out?
> > 
> > If that's fine with you I'll just change it on the way in.
> 
> You can always mount with -o dax and get DAX support.  That's how
> ext2/ext4 also work..

Ok, fair enough.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-30 16:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 14:51 [PATCH] xfs: disable per-inode DAX flag Christoph Hellwig
2017-08-30 16:17 ` Darrick J. Wong
2017-08-30 16:17   ` Christoph Hellwig
2017-08-30 16:56     ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.