]> git.michaelhowe.org Git - packages/o/openafs.git/commit
windows-dir-bplus-shortnames-20070912
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 12 Sep 2007 18:28:00 +0000 (18:28 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 12 Sep 2007 18:28:00 +0000 (18:28 +0000)
commit5647c133e938a7985365163ccac722119660e97f
tree0fb83573e38502d0f04e8cb4122eaf9f3b3e1413
parent40090977d270f6113cca4925b9564f57c4917f35
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.
src/WINNT/afsd/cm_btree.c
src/WINNT/afsd/cm_btree.h