FAT, NTFS, CIFS and DOS attributes

tridge at samba.org tridge at samba.org
Tue Jan 4 00:39:31 GMT 2005

 > Right, it's the "design is broken so everything ends up in user.*". 
 > Now, I clearly dislike the StudlyCaps used here, but if it's already 
 > deployed it's probably too late to fix this :(

Samba4 is only deployed by a very few brave sites (such as my wifes
server) who all know that things might change in non-compatible
ways. Still, I'd want a slightly stronger reason than dislike of
studly caps to change it :-)

 > Does Samba have any way do deal with VFAT short names?

Samba doesn't take advantage of the fact that VFAT can store short
names directly in the filesystem, and instead deals with short names
completely in userspace using a hash based name mangling scheme. It
treats VFAT as just another unix filesystem. People who want to deploy
a serious Samba server tend to want journaling, ACLs etc, so VFAT
isn't a candidate.

I currently don't store short file names in xattrs for Samba4 as there
has just no advantage to doing so. Without a "open by xattr contents"
call that doesn't have to scan the entire directory it is much more
efficient to store the 8.3 names in user-space where we can look them
up more efficiently. The scheme we use is to store a cache of
8.3->longname mappings, and when we get a 8.3 name that isn't in cache
we fall back to a directory scan, re-forming the 8.3 name using a hash
for each directory entry.

I'm also much less concerned about 8.3 names these days than I was a
few years ago, as the number of applications that need them is rapidly
dropping. There are some obvious exceptions (such as the idiotic API calls
that cmd.exe uses to implement "del *.*"), but we have worked out ways
to cope with those in a reasonable manner.

Cheers, Tridge

More information about the samba-technical mailing list