]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DEVEL15-windows-dir-bplus-shortnames-20070912
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 12 Sep 2007 18:29:44 +0000 (18:29 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 12 Sep 2007 18:29:44 +0000 (18:29 +0000)
commit760ee048995efd728f2c8936bb8c1e692db0b072
treef7cb8871355ec92ea0766786f81a78b4832ae85b
parentfb2d2552d98082c08eb6a9903e8bccb9493da3de
DEVEL15-windows-dir-bplus-shortnames-20070912

When a file name does not conform to 8.3 notation, an 8.3 notation
alias is generated for it.  This short name form must be searchable
in the B+ tree.

This commit adds a longname field to the data node which is used both
to identify the real name associated with the short name as well as
whether or not the short name is in fact an alias.   Being able to
determine whether or not a data node is an alias will be important
when we support using the B+ tree for directory enumeration.

For insertion, if the name does not conform to 8.3 notation, a second
entry is inserted into the B+ tree using the shortname as the key and
the longname stored in the data.

For deletion, we lookup the data node for the provided key.  If there
is a longname we remove the longname entry first and then the shortname
entry.  If the key is a longname, we lookup the data node so we can
acquire the FID and then use that to compute the shortname.  We then
remove both the shortname and longname entries from the B+ tree.

(cherry picked from commit 5647c133e938a7985365163ccac722119660e97f)
src/WINNT/afsd/cm_btree.c
src/WINNT/afsd/cm_btree.h