This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: rename(2) using NTFS transactions on Vista/2008
On May 19 21:21, Corinna Vinschen wrote:
> On May 19 12:53, Eric Blake wrote:
> > According to Corinna Vinschen on 5/15/2008 12:03 PM:
> >> Hi,
> >> I just applied a patch (rather, three patches) which uses the new
> >> transactional NTFS (TxF) feature introduced with Vista/2008 to add
> >> atomicity in a few border cases of the rename(2) function. POSIX
> >> requires that rename(2) works atomically, but without the new
> >> transactions, not all cases can be implemented atomically under Windows.
> >
> > cygwin-1.7.0-9 had problems with rename("file","link") returning a spurious
> > ENOENT. But I haven't been able to test 1.7.0-10 yet, to see if it has
> > been fixed.
>
> Probably not. How to reproduce?
>
> > Meanwhile, while looking at the code, is it really a good idea to have 3
> > stack-allocated path_conv variables, each 32k in size? That sounds like a
>
> They are not necessarily 32K but you're right, they could be in the
> worst case.
>
> > recipe for disaster if the user's app is nearly at the end of the stack,
> > and the 32k path_conv straddles the guard page, such that the stack growth
> > faults outside of the guard page.
>
> Agreed. I'll change that to using tmp_pathbufs.
Both problems should be fixed now.
Thanks for the report,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat