Subject: Re: VFS LKMs & pool_init() panic
To: Martin Husemann <>
From: Jaromir Dolecek <>
List: tech-kern
Date: 03/12/2000 12:22:19
Martin Husemann wrote:
> > Solutions would be to add a new VFS routine, say vfs_done,
> > which would be called from vfs_detach() - so that each
> > filesystem would have a chance to clean up whatever it needs,
> > before it's unloaded.
> Wouldn't a general LKM-before-unload cleanup be better? And work for
> other types of LKM's too ;-)

There is already the way to do general cleanups before unload -
un unload, FOO_lkmentry() is called with cmd == LKM_E_UNLOAD
and lkm can handle it any way it needs to.

BUT stuffing the global fs cleanup into lkminit_vfs.c does strike me as
wrong - it would need intimate knowledge about what resources
the fs uses and if the filesystem is changed, it's lkminit_vfs.c
would need to be adapted, too. I'd prefer to keep all
fs-related code in the fs itself and not spreading it
all over place. I like the current approach of VFS lkms,
where it's FOO_lkmentry() is just a glue routine
with (almost) no knowledge of fs internals (the only thing it needs
is a pointer to respective vfsops structure).

Jaromir Dolecek <>
@@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@