"Robert W. Fuller" <[EMAIL PROTECTED]> wrote:

> James C. McPherson wrote:
> > 
> > IMNSHO no matter what technologies Microsoft has coming in
> > their new winfs, they still won't be able to include any of
> > ZFS in it because the paradigm-shift will be too great for
> > their codebase to handle.
> > 
>
> IIRC, Windows "FASTFAT" file system is over 80,000 lines of code.  Linux's
> implmentation of FAT is about 5,000 lines.

The Solaris FAT code is about 8,500 lines. I know that it needs to be reworked
and it will most likely become more but definitely not 80,000 lines.



> This arises from design differences between the file system layers.  In the
> Microsoft kernel, the file systems call library routines, such as the FsRtl
> family (File system Run time library.)  Witness the code bloat.
>
> Instead, Linux uses what I call an inverted library model.  Others might call
> this a "framework."  The Linux file system layer itself provides default
> functionality and allows individual file systems to override that 
> functionality.
>  As it turns out, even with two dozen of file systems, different file systems
> share a lot of common functionality.  In terms of size of code, having that
> common functionality reside in the file system layer, rather than making the
> file systems call library routines, results in much less code.

I did liik into the Linux filesystem layer interface about 7 years ago and it 
was a nightmare. 


> The Solaris file system layer somewhat benefits from the advantages of the 
> Linux
> design, but also suffers from some of the disadvantages of the Windows design.
> These fundamental differences in philosophy merit consideration as people 
> write
> more file systems for Open Solaris.

As the Solaris VFS layer has been designed around 1985, it cannot benefit from
a "Linux design"....

Comparing the Solaris and the Linux VFS interface Layer did let me come to the
same conclusion as I had in 1990 when I did write my "wofs" as my masterthesis
for SunOS-4.0.

The Solaris VFS layer is a _really_ nice design with a few minor exceptions:

-       Some of the mount code which is in the callback 
        xxx_mount()/xxx_unmount()/... (usually in the file xxx_vfsops.c) could
        use common code for many filesystems - but not for all of them.

        It thus could make the code for a template filesystem source a bit 
smaller 
        in case this code would be callable from external. But note that in 
        order to be flexibl enough, it does not make sense to move the interface
        to a different level in the source.

-       The routines xxx_getpage()/xxx_putpage() usually copy ~ 1000 lines of 
        template code from another filesystem. As this code is very simular
        for all filesystems, there definitely should be a common library or 
        callback.

If you like to understand the design ond the Solaris VFS interface layer, I 
encourage you to read the sources for "lofs".


Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]        (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to