All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Jeffle Xu <jefflexu@linux.alibaba.com>
Cc: virtio-fs@redhat.com, linux-fsdevel@vger.kernel.org,
	joseph.qi@linux.alibaba.com, miklos@szeredi.hu
Subject: Re: [Virtio-fs] [PATCH v8 7/7] Documentation/filesystem/dax: DAX on virtiofs
Date: Mon, 13 Dec 2021 13:11:08 -0500	[thread overview]
Message-ID: <YbeMvKVmzUwmrZhC@redhat.com> (raw)
In-Reply-To: <20211125070530.79602-8-jefflexu@linux.alibaba.com>

On Thu, Nov 25, 2021 at 03:05:30PM +0800, Jeffle Xu wrote:
> 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>

Vivek

> ---
>  Documentation/filesystems/dax.rst | 20 ++++++++++++++++++--
>  1 file 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
>  --------------------------------------------
>  
> -- 
> 2.27.0
> 


WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Jeffle Xu <jefflexu@linux.alibaba.com>
Cc: stefanha@redhat.com, miklos@szeredi.hu, virtio-fs@redhat.com,
	linux-fsdevel@vger.kernel.org, joseph.qi@linux.alibaba.com
Subject: Re: [PATCH v8 7/7] Documentation/filesystem/dax: DAX on virtiofs
Date: Mon, 13 Dec 2021 13:11:08 -0500	[thread overview]
Message-ID: <YbeMvKVmzUwmrZhC@redhat.com> (raw)
In-Reply-To: <20211125070530.79602-8-jefflexu@linux.alibaba.com>

On Thu, Nov 25, 2021 at 03:05:30PM +0800, Jeffle Xu wrote:
> 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>

Vivek

> ---
>  Documentation/filesystems/dax.rst | 20 ++++++++++++++++++--
>  1 file 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
>  --------------------------------------------
>  
> -- 
> 2.27.0
> 


  reply	other threads:[~2021-12-13 18:11 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25  7:05 [Virtio-fs] [PATCH v8 0/7] fuse,virtiofs: support per-file DAX Jeffle Xu
2021-11-25  7:05 ` Jeffle Xu
2021-11-25  7:05 ` [Virtio-fs] [PATCH v8 1/7] fuse: add fuse_should_enable_dax() helper Jeffle Xu
2021-11-25  7:05   ` Jeffle Xu
2021-12-13 18:08   ` [Virtio-fs] " Vivek Goyal
2021-12-13 18:08     ` Vivek Goyal
2021-11-25  7:05 ` [Virtio-fs] [PATCH v8 2/7] fuse: make DAX mount option a tri-state Jeffle Xu
2021-11-25  7:05   ` Jeffle Xu
2021-12-13 18:09   ` [Virtio-fs] " Vivek Goyal
2021-12-13 18:09     ` Vivek Goyal
2021-11-25  7:05 ` [Virtio-fs] [PATCH v8 3/7] fuse: support per inode DAX in fuse protocol Jeffle Xu
2021-11-25  7:05   ` Jeffle Xu
2021-12-13 18:09   ` [Virtio-fs] " Vivek Goyal
2021-12-13 18:09     ` Vivek Goyal
2021-11-25  7:05 ` [Virtio-fs] [PATCH v8 4/7] fuse: enable per inode DAX Jeffle Xu
2021-11-25  7:05   ` Jeffle Xu
2021-12-13 18:10   ` [Virtio-fs] " Vivek Goyal
2021-12-13 18:10     ` Vivek Goyal
2021-11-25  7:05 ` [Virtio-fs] [PATCH v8 5/7] fuse: negotiate per inode DAX in FUSE_INIT Jeffle Xu
2021-11-25  7:05   ` Jeffle Xu
2021-12-13 18:10   ` [Virtio-fs] " Vivek Goyal
2021-12-13 18:10     ` Vivek Goyal
2021-11-25  7:05 ` [Virtio-fs] [PATCH v8 6/7] fuse: mark inode DONT_CACHE when per inode DAX hint changes Jeffle Xu
2021-11-25  7:05   ` Jeffle Xu
2021-12-07 16:00   ` [Virtio-fs] " Vivek Goyal
2021-12-07 16:00     ` Vivek Goyal
2021-12-08  1:36     ` [Virtio-fs] " JeffleXu
2021-12-08  1:36       ` JeffleXu
2021-12-13 18:10   ` [Virtio-fs] " Vivek Goyal
2021-12-13 18:10     ` Vivek Goyal
2021-11-25  7:05 ` [Virtio-fs] [PATCH v8 7/7] Documentation/filesystem/dax: DAX on virtiofs Jeffle Xu
2021-11-25  7:05   ` Jeffle Xu
2021-12-13 18:11   ` Vivek Goyal [this message]
2021-12-13 18:11     ` Vivek Goyal
2021-12-13 18:12 ` [Virtio-fs] [PATCH v8 0/7] fuse,virtiofs: support per-file DAX Vivek Goyal
2021-12-13 18:12   ` Vivek Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YbeMvKVmzUwmrZhC@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=virtio-fs@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.