FUSE_SYNCFS allows the client to flush the host page cache. This isn't available in upstream linux yet, but the following tree can be used to test:
https://gitlab.com/gkurz/linux/-/tree/virtio-fs-sync Greg Kurz (2): Update linux headers to 5.12-rc8 + FUSE_SYNCFS virtiofsd: Add support for FUSE_SYNCFS request include/standard-headers/drm/drm_fourcc.h | 23 ++++- include/standard-headers/linux/ethtool.h | 54 ++++++----- include/standard-headers/linux/fuse.h | 14 ++- include/standard-headers/linux/input.h | 2 +- .../standard-headers/rdma/vmw_pvrdma-abi.h | 7 ++ linux-headers/asm-generic/unistd.h | 4 +- linux-headers/asm-mips/unistd_n32.h | 1 + linux-headers/asm-mips/unistd_n64.h | 1 + linux-headers/asm-mips/unistd_o32.h | 1 + linux-headers/asm-powerpc/kvm.h | 2 + linux-headers/asm-powerpc/unistd_32.h | 1 + linux-headers/asm-powerpc/unistd_64.h | 1 + linux-headers/asm-s390/unistd_32.h | 1 + linux-headers/asm-s390/unistd_64.h | 1 + linux-headers/asm-x86/kvm.h | 1 + linux-headers/asm-x86/unistd_32.h | 1 + linux-headers/asm-x86/unistd_64.h | 1 + linux-headers/asm-x86/unistd_x32.h | 1 + linux-headers/linux/kvm.h | 89 +++++++++++++++++++ linux-headers/linux/vfio.h | 27 ++++++ tools/virtiofsd/fuse_lowlevel.c | 19 ++++ tools/virtiofsd/fuse_lowlevel.h | 13 +++ tools/virtiofsd/passthrough_ll.c | 29 ++++++ tools/virtiofsd/passthrough_seccomp.c | 1 + 24 files changed, 268 insertions(+), 27 deletions(-) -- 2.26.3