DEVEL15-windows-rename-cross-dir-invalid-handle-20090220
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 21 Feb 2009 04:19:40 +0000 (04:19 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 21 Feb 2009 04:19:40 +0000 (04:19 +0000)
commit671c0e3435589e8bf51ec7101ea01303af582f5a
tree1fadebb3dbd4de834cae1f6ff8557d51e026ea1f
parenta0b49b790d4352008da298949660a8da0ccdeaa1
DEVEL15-windows-rename-cross-dir-invalid-handle-20090220

LICENSE MIT

Problems with the cm_Rename() functions:

 * when a rename occurs across directories, the file server allocates
   a new vnode which in turn alters the FID.  Since the new FID and
   potentially version number is unknown to the client, it is not
   possible to update the target directory with the new name and
   FID thereby avoiding reading the directory from the file server.

 * when the old vnode is removed, the callback is broken but the
   client did not discard the cm_scache_t object

In order to optimize the client cache AFS requires a RXAFS_RenameEx
rpc that is equivalent to the current RPC but returns the new FID
and status.  This would permit the cache manager to relabel the
data buffers and cm_scache_t that are known to contain valid data.

(cherry picked from commit 54a3c85ae44aaaac9dd933893d975199b3cdca70)
src/WINNT/afsd/cm_vnodeops.c