]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
fs/ext4: Make DAX mount option a tri-state
authorIra Weiny <ira.weiny@intel.com>
Thu, 28 May 2020 15:00:00 +0000 (08:00 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 29 May 2020 02:09:47 +0000 (22:09 -0400)
commit9cb20f94afcd2964944f9468e38da736ee855b19
treef87b49bb0d91b290cc39011d4afb23a03c138430
parent043546e46dc70c25ff7e2cf6d09cbb0424fc9978
fs/ext4: Make DAX mount option a tri-state

We add 'always', 'never', and 'inode' (default).  '-o dax' continues to
operate the same which is equivalent to 'always'.  This new
functionality is limited to ext4 only.

Specifically we introduce a 2nd DAX mount flag EXT4_MOUNT2_DAX_NEVER and set
it and EXT4_MOUNT_DAX_ALWAYS appropriately for the mode.

We also force EXT4_MOUNT2_DAX_NEVER if !CONFIG_FS_DAX.

Finally, EXT4_MOUNT2_DAX_INODE is used solely to detect if the user
specified that option for printing.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20200528150003.828793-7-ira.weiny@intel.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/super.c