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, probably, POSIX rename/unlink > > > won't work. > > > > I thought that if there was no FILE_SUPPORTS_OPEN_BY_FILE_ID > > and OpenByFileId() worked, it would be a Signature, > > but the result was different. > > > > I tested OpenByFileID() on a bind-mounted directory, it was failed. > > Maybe it's because of the path isolation. > > ltsc2022 process isolation says "I support it" but it not works. > > Okay, it's not a security issue. So now I'm writing this here. > > > > Unfortunately, the state of the FILE_SUPPORTS_OPEN_BY_FILE_ID flag > > does not match the actual behavior, so I fear it may be corrected. > > Actually, it doesn't matter if open by fileID works. The fact that > this flag is missing *is* a pattern we can use. It allows us to > distinguish the hyper-v isolated NTFS from a standard NTFS and thus, > we can immediately do the right thing. > > > ps > > Corinna, I read the new email about fs_info::update patch > > you posted while I was writing this. > > I will report back when I test it, but it may take some time > > as I usually use msys2 and don't have a cygwin development environment. > > No worries!
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 is important, because my patch would only change the outcome if the Cygwin process in the Hyper-V container gets the NTFS filesystem presented as a remote filesystem. I noticed this problem when I was looking into implementing the FILE_SUPPORTS_OPEN_BY_FILE_ID flag checking. I have a different solution from the one I pushed today in the loop which probably makesmuch more sense and is independent of the subtil difference between loca and remote FS. Corinna
