kvm-guest-drivers-windows icon indicating copy to clipboard operation
kvm-guest-drivers-windows copied to clipboard

virtio-fs doesn't aware modified unless refresh

Open fecet opened this issue 2 years ago • 8 comments
trafficstars

Describe the bug

After modify file system on host, windows guest have to refresh to know that.

To Reproduce Steps to reproduce the behaviour:

Write something on host

Expected behavior A clear and concise description of what you expected to happen.

Changes happen on guest as soon as host

Screenshots image

Host:

  • Disto: Ubuntu
  • Kernel version: 5.0.4
  • QEMU version 7.0
  • QEMU command line start by virt-manager
  • libvirt version 8.6
  • libvirt XML file

VM:

  • Windows 10
  • virtiofs
  • 1.229

Additional context Add any other context about the problem here.

fecet avatar Jul 26 '23 07:07 fecet

Hi @fecet,

Windows Explorer shows a state as of the most recent ReadDirectory return. But any new request to FS will work with an updated state.

From an architectural point of view, Explorer can show an updated state with ReadDirectoryChangesW, but in the virtiofs service it requires a processing of the notify VirtIO queue. Also I'm not sure that WinFsp has full support of such FS to kernel notify logic.

To sum up, this is hypothetically feasible, but requires a lot of investigation and development. I'm not sure this is a good investment of time for just seeing host updates in Explorer.

viktor-prutyanov avatar Jul 26 '23 10:07 viktor-prutyanov

of course we dont care Explorer but for some reason I need to modify file on host and watch the changes in guest. Maybe watching file soulds like a interesting feature good to consider.

My current solution is share smb from guest, it's really slow

fecet avatar Jul 26 '23 10:07 fecet

All changes are seen on the guest side

viktor-prutyanov avatar Jul 26 '23 11:07 viktor-prutyanov

Explorer simply doesn't show them

viktor-prutyanov avatar Jul 26 '23 16:07 viktor-prutyanov

So it's perhaps beeter to be a FR, add watching file support for guest

fecet avatar Jul 26 '23 16:07 fecet

OK, so let's reopen it and mark it as a feature request.

viktor-prutyanov avatar Jul 28 '23 07:07 viktor-prutyanov