This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rename(2) using NTFS transactions on Vista/2008


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.


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 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.

--
Don't work too hard, make some time for fun as well!

Eric Blake ebb9@byu.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]