]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit - fs/fuse/fuse_i.h
fuse: make DAX mount option a tri-state
authorJeffle Xu <jefflexu@linux.alibaba.com>
Thu, 25 Nov 2021 07:05:25 +0000 (15:05 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 14 Dec 2021 10:09:36 +0000 (11:09 +0100)
commit780b1b959f9bd959e1aca450e9fee0e2c00b31ad
tree8e1704713c3fdbd5328a5c2b28e178e06e98bcbf
parentcecd491641c23f3c63958a62efb74cdaf3c93d7b
fuse: 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'.

The following behavior is consistent with that on ext4/xfs:

 - The default behavior (when neither '-o dax' nor
   '-o dax=always|never|inode' option is specified) is equal to 'inode'
   mode, while 'dax=inode' won't be printed among the mount option list.

 - The 'inode' mode is only advisory. It will silently fallback to 'never'
   mode if fuse server doesn't support that.

Also noted that by the time of this commit, 'inode' mode is actually equal
to 'always' mode, before the per inode DAX flag is introduced in the
following patch.

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dax.c
fs/fuse/fuse_i.h
fs/fuse/inode.c
fs/fuse/virtio_fs.c