Re: [PATCH v2 3/3] compat/mingw: support POSIX semantics for atomic renames
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 27, 2024, 23:50 UTC
- Message-ID
- <Zx7Rxz0ZG+Gqwf03@nand.local>
- In-Reply-To
- <c044ea3c-2f8c-45c1-99cf-17d9dad5b55f@kdbg.org>
On Sun, Oct 27, 2024 at 10:36:55PM +0100, Johannes Sixt wrote:
Show 30 quoted lines
> >> Ah, I was confused twice here. First, the documentation that you cite[*] > >> mentions FILE_RENAME_POSIX_SEMANTICS, but the name does not exist at > >> all. There does exist FILE_RENAME_FLAG_POSIX_SEMANTICS. The > >> documentation is just wrong. And in my earlier comment I copied the > >> inexistent flag name. > >> > >> But I meant to cite this flag: FILE_FLAG_POSIX_SEMANTICS (no "RENAME"). > >> It exists and is for CreateFileW(). > >> > >> Perhaps you also meant cite the latter one as the flag that "is not for > >> use with `SetFileInformationByHandle()`"? > >> > >> At any rate, the paragraph as written isn't correct. > > > > I think I'm missing something. That's what the paragraph says: > > > > Careful readers might have noticed that [1] does not mention the above > > flag, but instead mentions `FILE_RENAME_POSIX_SEMANTICS`. This flag is > > not for use with `SetFileInformationByHandle()` though, which is what we > > use. And while the `FILE_RENAME_FLAG_POSIX_SEMANTICS` flag exists, it is > > not documented on [2] or anywhere else as far as I can tell. > > > > And I'd claim it is correct. > > > > [snip] > > > > [1]: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_file_rename_information > > [2]: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/fltkernel/nf-fltkernel-fltsetinformationfile > > OK, then let's leave the text as it is.
Thanks, both, for vetting it carefully.
Thanks, Taylor