Date: Wed, 4 Mar 2009 15:19:52 -0800 From: "Matthew Fleming" <matthew.fleming@isilon.com> To: <freebsd-arch@freebsd.org> Subject: knotes and force unmount Message-ID: <06D5F9F6F655AD4C92E28B662F7F853E0275F637@seaxch09.desktop.isilon.com>
next in thread | raw e-mail | index | archive | help
At close() time knote_fdclose() will take care of any outstanding knotes for the file by looping over the list, calling kn_fop->f_detach and then knote_drop(). For a umount -f, there may still be open files; these will be handled in vgonel() by a call to VOP_CLOSE(). knotes are untouched in this case. If the filesystem is from a loadable module, then the knotes need to be cleaned up before the module is unloaded to prevent a callout into code that no longer exists, when the file is later closed. So it seems like there is code missing from vgonel() that should be doing this for the case where it calls VOP_CLOSE(). I realize this isn't a problem for ufs (never unloaded because it's used for /) and NFS (no events), but for any other filesystem this seems like a hole in the force unmount story. Is this interpretation correct? It would always be possible to add code to a filesystem's vop_close routine or its unmount routine, but architecturally this seems like something that should be handled at vgonel->VOP_CLOSE time, because it's a problem for any loadable filesystem with events. Thanks, matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?06D5F9F6F655AD4C92E28B662F7F853E0275F637>