This code has been enhanced to make aufs faster. Also the file afpdt.c has
an error corrected.

Here are a few comments to make aufs faster:

The code here also have a lot of patches applied at Rutgers where I fetched
the code, but if you want speed do not enable SIZESERVER or NOCASEMATCH.

Also check in the makefile after you have configured cap so that
SMART_UNIX_FINDERINFO is not defined. It slows down looking at unix
directories in the finder.

If you are using a Sun, when you check the m4.setup file in the cap50 directory
STATFS should be defined and not SUNQUOTA.

------------
What have I done?

When one checks what aufs is doing, one finds that it is doing a lot
of stat calls. Very often on the same file several times. Also aufs uses
full pathnames.

Most of my new code is in the file afpspd.c. 

The routines in afpspd.c handles caching of stats of files and allows
open and stat to work relative to current working directory instead of
using full path names. My redefined stat and open calls are used in some of the
other files to speed things up.
Note: not all stat and open calls are replaced. Only the most important ones.
And I have avoided to change stat calls where modifications to files are
done.

The stats cached are expired after 2 minutes and are immediately invalidated
on requests that modify the filesystem.

The working directory is changed by some of the requests, this means that
if aufs core dumps it will probably do that in one of the base directories
of the volumes mounted on the Mac.


      Please send bug reports to Dan@dna.lth.se


    Dan
