Subject: Re: LKM support
To: Matthias Scheler <tron@lyssa.owl.de>
From: Michael Graff <explorer@flame.org>
List: current-users
Date: 11/04/1996 21:00:23
tron@lyssa.owl.de (Matthias Scheler) writes:

> today I successfully built LKMs for "cd9660", "fdesc", "msdosfs", "portal",
> "umapfs" and "union" - good work, Michael - , only "fifofs" refused to
> compile.

fifofs doesn't really make sense to have.  I should remove it, really.
There is a reason the lkm/vfs/Makefile doesn't have it listed.  :)

> But I think we need to add some stuff to "/etc/rc" for early module
> loading. I couldn't turn "mfs", "kernfs" and "procfs" into LKMs
> because I need these filesystems to be available while "/etc/fstab"
> is processed.

I did this, in fact.

Set FILESYS_LKM and FILESYS_STATIC to include the filesystems you load on
boot...  For example:

FILESYS_LKM="procfs kernfs msdos mfs"
FILESYS_STATIC="cd9660"

#
# first thing is to load loadable kernel modules
#

for fstype in $FILESYS_LKM ; do
        case "$fstype" in
        msdos)
                echo -n "msdos:  "
                modload -v -e msdosfs_lkmentry -o /var/run/lkm.msdosfs /usr/lkm/msdosfs.o
                mount -a -t msdos
                ;;
        procfs|kernfs|cd9660|mfs)
                echo -n "$fstype:  "
                modload -v -e ${fstype}_lkmentry -o /var/run/lkm.${fstype} /usr/lkm/${fstype}.o
                mount -a -t $fstype
                ;;
        *)
                echo "Unknown filesystem type $fstype"
                ;;
        esac
done

for fstype in $FILESYS_STATIC ; do
        case "$fstype" in
        *)
                mount -a -t $fstype
                ;;
        esac
done

> And I have two questions left:
> - Will those arguments to "modload" be required for all times? Or will
>   this be improved if the LKM interface cleanup is done.

Perhaps, I don't know.

> - What is the use of the "ffs" LKM? For diskless NFS clients? Because
>   else it could be hard to load this LKM without filesystem support.

NFS-only machines have little use for ffs, but you are correct, most
machines should have ffs compiled in.

--Michael