cvs commit: src/sys/fs/msdosfs msdosfs_conv.c

Bruce Evans bde at zeta.org.au
Tue Feb 8 11:56:11 GMT 2005


On Tue, 8 Feb 2005, Nate Lawson wrote:

> Nate Lawson wrote:
> > njl         2005-02-08 07:51:14 UTC
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     sys/fs/msdosfs       msdosfs_conv.c
> >   Log:
> >   Unroll the loop for calculating the 8.3 filename checksum.  In testing
> >   on my P3, microbenchmarks show the unrolled version is 78x faster.  In
> >   actual use (recursive ls), this gives an average of 9% improvement in
> >   system time and 2% improvement in wall time.
> >
> >   Revision  Changes    Path
> >   1.39      +14 -5     src/sys/fs/msdosfs/msdosfs_conv.c
>
> I also tested this version in usermode on some candidate strings to be
> sure its output matches the original version.  The mbnambuf functions
> are my next victim.

It's interesting that the performance improvement is large enough to measure.

While you're there, do you have any idea on how to handle files with
invalid file names?  In 8.3 mode they are accessible with names like
foobar~1, but in Win95 mode they cannot even be stat()ed although they
can be seen using readdir() or read().  I have just 1 such file (a
pointer to a home page) and don't want to load libiconv to just to copy
it for backing up.  There is a recent PR about file names becoming
inaccessible even with libiconv due to locale problems.  I think there
should be a fallback to something like foobar~1 in general.  It may
be a bug that readdir() shows invalid file names or that it doesn't
convert them.

Bruce


More information about the cvs-src mailing list