Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtiofs support for case-insensitivity #669

Closed
davispuh opened this issue Oct 25, 2021 · 14 comments
Closed

Virtiofs support for case-insensitivity #669

davispuh opened this issue Oct 25, 2021 · 14 comments

Comments

@davispuh
Copy link
Contributor

Currently if a linux case-sensitive filesystem is mapped to Windows guest using virtiofs then a lot of programs doesn't work trying to access files on this mapped disk because of genius developers unable to stick to single file casing at different parts of program.
eg. one function loads one.DLL while different function uses One.dll and so on.
It causes this mapping hardly usable...
Are there any plans of adding support for case insensitivity?

@xiagao
Copy link

xiagao commented Nov 3, 2021

davispuh hi,
To be honest, I'm not understand your issue,could you say more about it?such as, which programs are you using?Are those programs using the same file on the mapping disk,but can't work?

Thanks,
Xiaoling

@davispuh
Copy link
Contributor Author

davispuh commented Nov 4, 2021

There are many programs with such issues. But one example is Steam (https://store.steampowered.com/about/).

Some parts of code are trying to access SteamUI.dll (that's how it's saved on disk) while other places in code are accessing steamui.dll which fails to read.
You can easily see it with Process Monitor

image

image

image

If I run it from Samba share then it works fine since Samba handles case insensitivity but that's not using Virtiofs so performance is worse.

Also this isn't only file with such casing issue. You can either symlink it or copy to have both names but that just leads to next issue. So case insensitivity really needs to be implemented in Virtiofs.

@xiagao
Copy link

xiagao commented Nov 24, 2021

@davispuh
Thanks to propose this issue.
Compared the virtiofs file system and the native NTFS file system, it's indeed a problem.We will track this issue in downstream as well.

Z:>echo testing > TEST.txt

Z:>type test.txt
The system cannot find the file specified.

Z:>echo testing > c:\TEST.txt

Z:>type c:\TEST.txt
testing

BR,
Xiaoling

@Madouura
Copy link

Can confirm, several games in my steam library won't run due to this.

@YanVugenfirer
Copy link
Collaborator

Hello All,

Please help us understanding you use cases for using virtio-fs, and thus make us virtio-fs support better.
Please participate in the discussion and add your use cases: #726

Thanks a lot,
Yan.

@Daniel-Trevitz
Copy link
Contributor

Ironically, I ran into this while trying to compile virtio-fs. Not exactly self hosting ;)

Reading through the code, am I correct in believing that the case folding would have to be done either

  • At the linux filesystem level (I.e. ext4 described here)
  • Within libvirt/qemu's implementation of the host's filename lookup.

I, for one, don't like that first option because I either have to limit my shared folder to a specific directory or lose case insensitivity on my home folder (not happening).

The second option would be dependent on libvirt/qemu's openness to such behavior (which would certainly need to flaggable), implementing case folding (which will be annoying to get right), and then exposing the new flag in the XML of libvirt.

Specifically, I'm saying does it look to be something this project can not work around. I say this because it looks like the file name lookup request is done via a call to DeviceIoControl, which I suspect passes through a shim driver to qemu's virtio pci device.

@YanVugenfirer
Copy link
Collaborator

Enhancing QEMU\libvirt is possible. When having concrete proposal, we can discuss it on appropriate mailing lists.
Looking at what Samba did - there is no generic solution, the behaviour is controlled by the configuration, but at least user is aware of expected behaviour.

@Daniel-Trevitz
Copy link
Contributor

Enhancing QEMU\libvirt is possible. When having concrete proposal, we can discuss it on appropriate mailing lists.

@YanVugenfirer, What mail list do you recommend?

@YanVugenfirer
Copy link
Collaborator

virtio-fs: https://listman.redhat.com/mailman/listinfo/virtio-fs
qemu-devel: https://lists.nongnu.org/mailman/listinfo/qemu-devel
libvirt: https://listman.redhat.com/mailman/listinfo/libvir-list

@vananasun
Copy link

vananasun commented Oct 25, 2022

Encountered the same issue :( Cannot compile my Visual Studio projects because of this

@dblueman
Copy link

dblueman commented Feb 13, 2023

This has been addressed already in https://bugzilla.redhat.com/show_bug.cgi?id=2026299 .

Using a newer release from https://github.com/billziss-gh/winfsp/releases, in the Windows guest, open regedit, add HKEY_LOCAL_MACHINE\SOFTWARE\VirtIO-FS\CaseInsensitive as a DWORD with value 1 and restart the virtio-fs service or reboot.

Alternatively, the virtiofs binary can be started with -i.

Thanks,
Daniel

@YanVugenfirer
Copy link
Collaborator

@ZaberKo
Copy link

ZaberKo commented Apr 11, 2023

This has been addressed already in https://bugzilla.redhat.com/show_bug.cgi?id=2026299 .

Using a newer release from https://github.com/billziss-gh/winfsp/releases, in the Windows guest, open regedit, add HKEY_LOCAL_MACHINE\SOFTWARE\VirtIO-FS\CaseInsensitive as a DWORD with value 1 and restart the virtio-fs service or reboot.

Alternatively, the virtiofs binary can be started with -i.

Thanks, Daniel

Hello @dblueman. If I want to use multiple mount points mentioned in multiple-virtio-fs-instances, should I change the command to:

"C:\Program Files (x86)\WinFsp\bin\fsreg.bat" virtiofs "C:\Program Files\Virtio-Win\VioFS\virtiofs.exe" "-i -t %1 -m %2"

Not sure if I understand it correctly.

@viktor-prutyanov
Copy link
Collaborator

viktor-prutyanov commented Apr 12, 2023

If I want to use multiple mount points mentioned in multiple-virtio-fs-instances, should I change the command to:

"C:\Program Files (x86)\WinFsp\bin\fsreg.bat" virtiofs "C:\Program Files\Virtio-Win\VioFS\virtiofs.exe" "-i -t %1 -m %2"

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants