Moving 8.3 filenames into VFS - WAS Re: meeting with SUGJ

Christopher R. Hertel crh at nts.umn.edu
Fri Jul 20 04:38:29 GMT 2001


> On Thu, 19 Jul 2001, Christopher R. Hertel wrote:
> > Jerry wrote:
> > :
> > > Just as a reminder, I'm moving the retreival of 8.3 filename into
> > > the VFS.  The setting of short name should be done upon creation or at
> > > least handled by the VFS module.
> > 
> > Yes. yes. yes!  :-)
> > 
> > It needs to be in the VFS layer because, if it is, then someone can store
> > the mangled names in the (VFS) filesystem instead of a tbd database.  (Or 
> > perhaps they still use tdb, but it's hidden by the VFS layer.)
> 
> If mangled name is stored as an attribute to a file on a file
> system and only SAMBA knows about that attribute, how do you make sure
> that the mangled name is maintained?
> 
> Local operating system utilities that rename or move the file will not
> know to update the mangled name.

Sorry, my message was confusing.

There are multiple VFS layers.  Samba has a VFS layer, but so do many 
OSes these days.  *BSD and Linux in particular.

I have seen some vendors write their own filesystems.  Other vendors have
or are considering writing OS-level VFS filesystem modules on top of
existing filesystems.  I believe that Linux lets you build a virtual
filesystem on top of ext2fs, for example, thus saving a lot of time.  The
BSD flavors also make this quite easy.  In these cases, you would mount
the virtual filesystem rather than the real filesystem that the OS-VFS
layer uses. 

My point was that the name mangling code in Samba should be in the default
Samba-VFS layer code so that it can be easily replaced with a different
Samba-VFS layer that would deal with OS filesystems that can do their own
mangle-management. 

Does that make any more sense?

Imagine writing an OS-level VFS that supports ACLs, long names, and 8.3 
names.  You would then mount that VFS layer when the OS boots.  In 
addition, you would write a Samba-VFS layer that knows how to talk to 
your OS VFS.  Samba would not do any name mangling, because the 
underlying FS would do it for you.

For an example of creating a virtual filesystem on an OS you might take a 
look at the mount_null(8) man page from OpenBSD:

  http://www.openbsd.org/cgi-bin/man.cgi

...and enter mount_null.

Chris -)-----

-- 
Christopher R. Hertel -)-----                   University of Minnesota
crh at nts.umn.edu              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your hands...you choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz




More information about the samba-technical mailing list