linuxolator: proc/filesystems implementation

Kostik Belousov kostikbel at gmail.com
Thu Dec 14 04:32:49 PST 2006


On Thu, Dec 14, 2006 at 06:01:27AM -0600, Scot Hetzel wrote:
> Linux has a file in the procfs that shows all the loaded filesystem modules.
> 
> I have implemented the function that fills this file using the linprocfs 
> module.
> 
> What the function does is look for specific kernel modules using
> module_lookupbyname to create an entry in the proc/filesystems file:
> 
> # cat /compat/linux/proc/filesystems
>            cd9660
> nodev   devfs
> nodev   bsdprocfs
>            mfs
>            msdosfs
>            nfs
>            nfs4
> nodev   procfs
> nodev   sysfs
>            ufs
> # kldload smbfs
> # cat /compat/linux/proc/filesystems
>            cd9660
> nodev   devfs
> nodev   bsdprocfs
>            mfs
>            msdosfs
>            nfs
>            nfs4
> nodev   procfs
>            smbfs
> nodev   sysfs
>            ufs
> 
> Unloading a filesystem kernel module will remove the entry from
> proc/filesystems.

The kernel keeps the list of the registered fs types in the vfsconf list
of struct vfsconf. See sys/sys/mount.h and sys/kern/vfs_init.c.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20061214/af4faa47/attachment.pgp


More information about the freebsd-emulation mailing list