[PATCH 0/3] fix unlink/rename failure in hyper-v container
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Mar 17 19:15:53 GMT 2023
Hi,
On Mar 17 23:43, YO4 wrote:
> Hello, cygwin developers.
> I am using msys2 and it is based on the cygwin codebase.
> I was working inside a windows container and encountered rm.exe and mv.exe failures.
> I would be honored if you could merge my patch into upstream.
The patchset looks basically ok, and I'm not opposed to apply it.
But I do wonder if we cant't come up with a better solution somehow.
The problem is that you will suffer another performance hit on top
of the fact that Cygwin is already slow anyway. Every time you
run rm or rename, you will have to call the OS function twice.
So rm -r will become even slower.
The question here is, do we have a way to recognize a Hyper-V mount?
Have a look at fs_info::update() in mount.cc. There's a lot of checking
for various filesystems and their quirks. If we have a way to
distinguish a Hyper-V mount from a "normal" NTFS, we could add it as a
filesystem type of its own, and the "use_posix_semantics" flag would
simply never be set.
If we can do that, it's the cleaner solution, IMHO.
For that, can we start with you running
$ cd <your Hyper-V dir>
$ /usr/lib/csih/getVolInfo .
and paste the output here? If there's any chance we can recognize
a Hyper-V dir, we should take it.
Oh, and, btw., would you mind to recreate your git patches with your
real name, please? I'm not hot on adding pseudonyms into the git
repo. We all use our real names. Also, a matching `Signed-Off-By:'
would be helpful.
Thanks,
Corinna
More information about the Cygwin-patches
mailing list