how winnt fileops work and what to do about it (was Re:[Twisted-Python] Twisted windows hackers - help the tests to pass!)
paul-lists at perforge.com
Sat Dec 31 17:23:47 EST 2005
----- Original Message -----
From: "Jean-Paul Calderone" <exarkun at divmod.com>
To: "Twisted general discussion" <twisted-python at twistedmatrix.com>
Sent: Saturday, December 31, 2005 4:52 PM
Subject: Re: how winnt fileops work and what to do about it (was
Re:[Twisted-Python] Twisted windows hackers - help the tests to pass!)
> On Sat, 31 Dec 2005 05:48:43 -0500, Paul G <paul-lists at perforge.com>
>>ok, i can actually chime in here because i've done filesystems work on
>>windows (don't ask ;). now, it's been a while, but i should remember
>>things reasonably accurately (i hope). see below for comments:
> Thanks, Paul, for these comments. This cleared up a lot about how the
> filesystem works on Win32 for me.
just a quick revision from me, for the benefit of posterity only, since
investigating the feasibility of fixing the underlying cause (files being
held open) seems to be the best course of action.
>>4. test whether you can either use ZwSetFileInformation() to rename
>>directories by changing the FILE_NAME attr in the appropriate info
>>structure or use it to move by renaming files which are open, again using
>>the appropriate (but different) structure.
this will definitely not work for files based on the ddk docs i managed to
dig out, and will almost certainly not work for directories (though this
isn't documented either way). quite simply, expecting this to work is an
expectation borne out of familiarity with things like ext2/linux-vfs, where
all filesystem objects are inodes mapped into a namespace with dentries. it
appears that no matter how you slice it, the underlying implementation of
ntfs is drastically different, so a rename is a move and a move is a
copy+delete, which brings us back to our problem.
More information about the Twisted-Python