Windows: renames that overwrite existing target
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 31 Dec 2011 01:09:06 +0000 (20:09 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 31 Dec 2011 21:44:18 +0000 (13:44 -0800)
commit85f4971f850c0110915ba862922c1536ebe506c2
treec28ca9a0d4f90c086c637c448caa85e2895b2a21
parentd64983bab047ad6349d2edfe2ffa35b484529889
Windows: renames that overwrite existing target

The Windows client up to this point has never correctly implemented
directory renames.  For the longest time it assumed that the file
server would not replace a pre-existing target.  As a result, when
the target name was already in use the contents of the directory
would end up with the target name existing but its previous file id
associated with it.

A second problem was that lookups for the source and target names
were not performed while the directory (or directories) were exclusively
held to ensure that competing changes could not occur.

This patchset corrects both issues in cm_Rename() and adjusts the
redirector interface to match the new behavior.

Change-Id: I4f5cff7debcf9925947ac3fc6931565acb57ebd9
Reviewed-on: http://gerrit.openafs.org/6457
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsd/cm_vnodeops.c
src/WINNT/afsrdr/user/RDRFunction.c