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

Masayoshi Mizuma msys.mizuma at gmail.com
Fri Dec 13 17:57:33 UTC 2019


Hello,

Let me ask questions about atime update behavior of virtiofs.

Background:

I believe the atime update behavior of virtiofs is same as
the underlying filesystem and the atime mount option of virtiofs
is ignored.

For example, the underlying fileysystem is XFS and the atime option
is strictatime Then, mount the filesystem from the guest with noatime.

# mount -t virtiofs -o noatime myfs0 /mnt/myfs0

# cat /proc/mounts
...
myfs0 /mnt/myfs0 virtiofs rw,noatime 0 0
...

Check the atime as following script atime.h:
============
#!/bin/bash

FILE=/mnt/myfs0/foo

rm -f $FILE

echo "hello" > $FILE
stat --format=%x $FILE

sleep 10

cat $FILE > /dev/null
stat --format=%x $FILE
============

I can see the following result. The atime is updated even if the mount
option is noatime.

~]# ./atime.sh
2019-12-13 12:32:46.733024358 -0500
2019-12-13 12:32:56.752898507 -0500
~]#

Questions:

Q1. Is the atime behavior a specification for virtiofs, that means
    it's not a bug?

Q2. If Q1 is yes, I think it would be better if the atime behavior
    could be described to documents so that user can know the behavior.
    What is the appropriate document?
    - man page of virtiofsd which Dave is trying to merge?
      https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg02475.html
    - man page of mount(8)?
    - The official page (https://virtio-fs.gitlab.io/)?
    - Or...?

Thanks!
Masa





More information about the Virtio-fs mailing list