[RFC] kldunload -f argument.

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Jul 9 05:07:00 PDT 2004


In message <6595.1089317548 at critter.freebsd.dk>, Poul-Henning Kamp writes:
>
>In an ideal situation, unmount(8) will fail to unload if the
>filesystem is in use but the administrator has the option of applying
>the -f(orce) option which tells the kernel: "umount at any cost" [3].
>
>
>We do not have the same flexibility with kldunload(8), and this is
>leading to a minor spot of trouble for modules which autoattach to
>things, like for instance GEOM classes where it can be very hard if
>not impossible to get the module idle from userland so it can be
>unloaded.

Here is a patch which does this:

	http://phk.freebsd.dk/patch/kldunload.patch

Tests, comments etc welcome!

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list