Skip to contentSkip to conversation

ext4: handle dax mount option collision

PATCH In review Harshad Shirwadkar 2 participants 2 messages Nov 11, 2020 – Nov 12, 2020 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: handle dax mount option collision

Mount options dax=inode and dax=never collided with fast_commit and journal checksum. Redefine the mount flags to remove the collision.

Fixes 9cb20f94afcd2 ("fs/ext4: Make DAX mount option a tri-state")
---
 fs/ext4/ext4.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/ext4/ext4.h +3 -3
index 1b399cafb15a..bf9429484462 100644
@@ -1231,13 +1231,13 @@ struct ext4_inode_info {
 						      blocks */
 #define EXT4_MOUNT2_HURD_COMPAT		0x00000004 /* Support HURD-castrated
 						      file systems */
-#define EXT4_MOUNT2_DAX_NEVER		0x00000008 /* Do not allow Direct Access */
-#define EXT4_MOUNT2_DAX_INODE		0x00000010 /* For printing options only */
-
 #define EXT4_MOUNT2_EXPLICIT_JOURNAL_CHECKSUM	0x00000008 /* User explicitly
 						specified journal checksum */
 
 #define EXT4_MOUNT2_JOURNAL_FAST_COMMIT	0x00000010 /* Journal fast commit */
+#define EXT4_MOUNT2_DAX_NEVER		0x00000020 /* Do not allow Direct Access */
+#define EXT4_MOUNT2_DAX_INODE		0x00000040 /* For printing options only */
+
 
 #define clear_opt(sb, opt)		EXT4_SB(sb)->s_mount_opt &= \
 						~EXT4_MOUNT_##opt
Signature · 1 line
2.29.2.222.g5d2a92d10f8-goog
#1 lore raw
Quoted 2 lines · Harshad Shirwadkar

Mount options dax=inode and dax=never collided with fast_commit and journal checksum. Redefine the mount flags to remove the collision.

Tested OK.

Thanks for the quick fix.

Quoted 32 lines
Fixes 9cb20f94afcd2 ("fs/ext4: Make DAX mount option a tri-state")
---
 fs/ext4/ext4.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/ext4/ext4.h +3 -3
index 1b399cafb15a..bf9429484462 100644
@@ -1231,13 +1231,13 @@ struct ext4_inode_info {
 						      blocks */
 #define EXT4_MOUNT2_HURD_COMPAT		0x00000004 /* Support HURD-castrated
 						      file systems */
-#define EXT4_MOUNT2_DAX_NEVER		0x00000008 /* Do not allow Direct Access */
-#define EXT4_MOUNT2_DAX_INODE		0x00000010 /* For printing options only */
-
 #define EXT4_MOUNT2_EXPLICIT_JOURNAL_CHECKSUM	0x00000008 /* User explicitly
 						specified journal checksum */
 
 #define EXT4_MOUNT2_JOURNAL_FAST_COMMIT	0x00000010 /* Journal fast commit */
+#define EXT4_MOUNT2_DAX_NEVER		0x00000020 /* Do not allow Direct Access */
+#define EXT4_MOUNT2_DAX_INODE		0x00000040 /* For printing options only */
+
 
 #define clear_opt(sb, opt)		EXT4_SB(sb)->s_mount_opt &= \
 						~EXT4_MOUNT_##opt
Signature · 1 line
2.29.2.222.g5d2a92d10f8-goog
Signature · 1 line
Murphy