summaryrefslogtreecommitdiff
path: root/Documentation/filesystems/dax.rst
diff options
context:
space:
mode:
authorJeffle Xu <jefflexu@linux.alibaba.com>2021-11-25 10:05:30 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2021-12-14 13:09:37 +0300
commit073c3ab6ae0123601b5378e8f49c7b8ec4625f32 (patch)
tree9f6aa49c700e7ee5fd502f04abe05f6e770be96a /Documentation/filesystems/dax.rst
parentc3cb6f935e322fa183988032e318b293d9e4fe53 (diff)
downloadlinux-073c3ab6ae0123601b5378e8f49c7b8ec4625f32.tar.xz
Documentation/filesystem/dax: DAX on virtiofs
Record DAX on virtiofs and the semantic difference with that on ext4 and xfs. Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com> Reviewed-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'Documentation/filesystems/dax.rst')
-rw-r--r--Documentation/filesystems/dax.rst20
1 files changed, 18 insertions, 2 deletions
diff --git a/Documentation/filesystems/dax.rst b/Documentation/filesystems/dax.rst
index 9a1b8fd9e82b..e3b30429d703 100644
--- a/Documentation/filesystems/dax.rst
+++ b/Documentation/filesystems/dax.rst
@@ -23,8 +23,8 @@ on it as usual. The `DAX` code currently only supports files with a block
size equal to your kernel's `PAGE_SIZE`, so you may need to specify a block
size when creating the filesystem.
-Currently 3 filesystems support `DAX`: ext2, ext4 and xfs. Enabling `DAX` on them
-is different.
+Currently 4 filesystems support `DAX`: ext2, ext4, xfs and virtiofs.
+Enabling `DAX` on them is different.
Enabling DAX on ext2
--------------------
@@ -168,6 +168,22 @@ if the underlying media does not support dax and/or the filesystem is
overridden with a mount option.
+Enabling DAX on virtiofs
+----------------------------
+The semantic of DAX on virtiofs is basically equal to that on ext4 and xfs,
+except that when '-o dax=inode' is specified, virtiofs client derives the hint
+whether DAX shall be enabled or not from virtiofs server through FUSE protocol,
+rather than the persistent `FS_XFLAG_DAX` flag. That is, whether DAX shall be
+enabled or not is completely determined by virtiofs server, while virtiofs
+server itself may deploy various algorithm making this decision, e.g. depending
+on the persistent `FS_XFLAG_DAX` flag on the host.
+
+It is still supported to set or clear persistent `FS_XFLAG_DAX` flag inside
+guest, but it is not guaranteed that DAX will be enabled or disabled for
+corresponding file then. Users inside guest still need to call statx(2) and
+check the statx flag `STATX_ATTR_DAX` to see if DAX is enabled for this file.
+
+
Implementation Tips for Block Driver Writers
--------------------------------------------