Skip to contentSkip to conversation

xfs: disable per-inode DAX flag

PATCH In review Christoph Hellwig 2 participants 4 messages Aug 30, 2017 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: disable per-inode DAX flag

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

---
 fs/xfs/xfs_ioctl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/xfs/xfs_ioctl.c +2 -1
index 9c0c7a920304..06ca244c323a 100644
@@ -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
Signature · 1 line
2.11.0
#1 lore raw
Quoted 13 lines · Christoph Hellwig

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

---
 fs/xfs/xfs_ioctl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/xfs/xfs_ioctl.c +0 -0
index 9c0c7a920304..06ca244c323a 100644

fs/xfs/xfs_ioctl.c xfs_diflags_to_linux( · line 1011

Quoted 4 lines
fs/xfs/xfs_ioctl.c +1 -0
@@ -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

Quoted 16 lines
fs/xfs/xfs_ioctl.c +1 -1
 	if (xflags & FS_XFLAG_DAX)
 		inode->i_flags |= S_DAX;
 	else
 		inode->i_flags &= ~S_DAX;
-
+#endif
 }
 
 static int
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 5 lines · Darrick J. Wong

#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..

Reviewed-by
#3 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 5 lines · Darrick J. Wong

#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.

Quoted 4 lines

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