[Virtio-fs] Question: atime update behavior of virtiofs

Miklos Szeredi mszeredi at redhat.com
Tue Jan 21 08:37:16 UTC 2020


On Tue, Dec 17, 2019 at 10:02 PM Masayoshi Mizuma <msys.mizuma at gmail.com> wrote:

> I created a patch for virtiofs.rst to add the mount options and the
> atime behavior as following.
> Does it make sense?

Definitely would be good to see more clearly in this area.

Atime behavior is a somewhat complex topic, and not very well
understood.  This is (I guess) mostly because it's not relevant to the
vast majority of applications and hence basically very few users
actually care about it.

More comment below.

> From: Masayoshi Mizuma <m.mizuma at jp.fujitsu.com>
> Date: Tue, 17 Dec 2019 15:55:20 -0500
> Subject: [PATCH] virtio-fs: Add mount option and atime behavior to the doc
>
> Add a section to show the mount option and a subsection to show
> the atime behavior.
>
> Signed-off-by: Masayoshi Mizuma <m.mizuma at jp.fujitsu.com>
> ---
>  Documentation/filesystems/virtiofs.rst | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/Documentation/filesystems/virtiofs.rst b/Documentation/filesystems/virtiofs.rst
> index 4f338e3cb3f7..8b04160061fd 100644
> --- a/Documentation/filesystems/virtiofs.rst
> +++ b/Documentation/filesystems/virtiofs.rst
> @@ -37,6 +37,20 @@ Mount file system with tag ``myfs`` on ``/mnt``:
>  Please see https://virtio-fs.gitlab.io/ for details on how to configure QEMU
>  and the virtiofsd daemon.
>
> +Mount options
> +-------------
> +
> +virtiofs supports general VFS mount options, for example, remount,
> +ro, rw, context, etc. It also supports FUSE mount options.
> +
> +atime behavior
> +^^^^^^^^^^^^^^
> +
> +The atime-related mount options, for example, noatime, strictatime,
> +are ignored. The atime behavior for virtiofs is the same as the
> +underlying filesystem of the directory that has been exported
> +on the host.

This is true in the "cache=none" case, because then each and every
operation performed on virtio fs will be forwarded to the host
filesystem, which will take care of updating atime.

However in the "cache=(auto|always)" cases reads may be satisfied out
of the cache in which case the atime will not be touched, regadless of
the options used on the host filesystem.

Also the DAX case will introduce additional subtleties, because mmaped
reads may not update the atime on host fs.

Thanks,
Miklos





More information about the Virtio-fs mailing list