Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-24 Thread Jon Turney
On 24/03/2023 13:22, Corinna Vinschen wrote: On Mar 24 13:20, Jon Turney wrote: On 24/03/2023 11:54, Corinna Vinschen wrote: On Mar 24 01:40, Yoshinao Muramatsu wrote: On 2023/03/22 2:58, Corinna Vinschen wrote: I pushed a new Cygwin DLL, test release 3.5.0-0.251.gfe2545e9faaf. This should do

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-24 Thread Yoshinao Muramatsu
On 2023/03/24 20:54, Corinna Vinschen wrote: > Thanks, I pushed your patches. We can reevaluate the > FILE_SUPPORTS_OPEN_BY_FILE_ID handling if Microsoft actually > changes this in Hyper-V. Great! Now we've got a working implementation and we know why the code is the way it is. I use msys2 and

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-24 Thread Corinna Vinschen
On Mar 24 13:20, Jon Turney wrote: > On 24/03/2023 11:54, Corinna Vinschen wrote: > > On Mar 24 01:40, Yoshinao Muramatsu wrote: > > > On 2023/03/22 2:58, Corinna Vinschen wrote: > > > > I pushed a new Cygwin DLL, test release 3.5.0-0.251.gfe2545e9faaf. > > > > This should do what we want, now. If

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-24 Thread Jon Turney
On 24/03/2023 11:54, Corinna Vinschen wrote: On Mar 24 01:40, Yoshinao Muramatsu wrote: On 2023/03/22 2:58, Corinna Vinschen wrote: I pushed a new Cygwin DLL, test release 3.5.0-0.251.gfe2545e9faaf. This should do what we want, now. If you can confirm, I'll push your workaround afterwards. I

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-24 Thread Corinna Vinschen
On Mar 24 01:40, Yoshinao Muramatsu wrote: > On 2023/03/22 2:58, Corinna Vinschen wrote: > > I pushed a new Cygwin DLL, test release 3.5.0-0.251.gfe2545e9faaf. > > This should do what we want, now. If you can confirm, I'll push > > your workaround afterwards. > > I have tested cygwin-3.5.0-0.251.

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-23 Thread Yoshinao Muramatsu
On 2023/03/22 2:58, Corinna Vinschen wrote: > I pushed a new Cygwin DLL, test release 3.5.0-0.251.gfe2545e9faaf. > This should do what we want, now. If you can confirm, I'll push > your workaround afterwards. I have tested cygwin-3.5.0-0.251.gfe2545e9faaf. It works fine with bind mounted directo

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-21 Thread Corinna Vinschen
On Mar 22 00:32, Yoshinao Muramatsu wrote: > > Wait. I might have misunderstood something. This is about accessing a > > host NTFS from inside a Hyper-V isolated process, right? So from the > > point of view of the Hyper-V isolated Cygwin process, the NTFS > > filesystem is a *local* filesystem?

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-21 Thread Yoshinao Muramatsu
Wait. I might have misunderstood something. This is about accessing a host NTFS from inside a Hyper-V isolated process, right? So from the point of view of the Hyper-V isolated Cygwin process, the NTFS filesystem is a *local* filesystem? Or is it mapped as a remote filesystem? The difference

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-20 Thread Corinna Vinschen
On Mar 20 15:51, Corinna Vinschen wrote: > On Mar 20 22:06, Yoshinao Muramatsu wrote: > > On 2023/03/18 19:01, Corinna Vinschen wrote: > > > FILE_SUPPORTS_OPEN_BY_FILE_ID flag is missing. > > > > > > NTFS always supports this since Windows 2003! So we could > > > use this flag as indicator that,

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-20 Thread Corinna Vinschen
On Mar 20 15:51, Corinna Vinschen wrote: > On Mar 20 22:06, Yoshinao Muramatsu wrote: > > On 2023/03/18 19:01, Corinna Vinschen wrote: > > > FILE_SUPPORTS_OPEN_BY_FILE_ID flag is missing. > > > > > > NTFS always supports this since Windows 2003! So we could > > > use this flag as indicator that,

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-20 Thread Corinna Vinschen
On Mar 20 22:06, Yoshinao Muramatsu wrote: > On 2023/03/18 19:01, Corinna Vinschen wrote: > > FILE_SUPPORTS_OPEN_BY_FILE_ID flag is missing. > > > > NTFS always supports this since Windows 2003! So we could > > use this flag as indicator that, probably, POSIX rename/unlink > > won't work. > > I

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-20 Thread Yoshinao Muramatsu
On 2023/03/18 19:01, Corinna Vinschen wrote: In the logs, here we can find some differences. But I believe it is unclear if it will always be so. If additional inspections are done, they will be costly. Assuming we can pull some information from the filesystem flags, the cost is negligible. We

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container(regenerate)

2023-03-20 Thread Corinna Vinschen
Hi Yoshinao, I just pushed a patch to fs_info::update to take the filesystem flags introduced starting with Windows 7 into account: https://sourceware.org/cgit/newlib-cygwin/commit/?id=fcccdc4021ff AFAICS, this patch should already fix the problem. It's not the last state, though, because a few

[PATCH 0/3] fix unlink/rename failure in hyper-v container(regenerate)

2023-03-20 Thread Yoshinao Muramatsu
From: Yoshinao use real name and add `Signed-Off-By:' field, as suggested by Corinna. code is untouched. Yoshinao Muramatsu (3): fix unlink in container fix rename in container log disabling posix semantics winsup/cygwin/syscalls.cc | 23 +-- 1 file changed, 21 insert

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-18 Thread Corinna Vinschen
Hi Yoshinao, On Mar 18 14:29, Yoshinao Muramatsu wrote: > Hi Corinna. > I'm Yoshinao Muramatsu. Thank you for your thoughtful guidance. > I have not modified the patch yet, > but I have made some observations and post the results. > > I forgot to mention in my first post that there is a workaroun

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-17 Thread Yoshinao Muramatsu
Hi Corinna. I'm Yoshinao Muramatsu. Thank you for your thoughtful guidance. I have not modified the patch yet, but I have made some observations and post the results. I forgot to mention in my first post that there is a workaround for this issue, which is to use process isolation unless hyper-v i

Re: [PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-17 Thread Corinna Vinschen
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 basic

[PATCH 0/3] fix unlink/rename failure in hyper-v container

2023-03-17 Thread YO4
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. How to reproduce: Use a version of windows that supports POSIX unli