Date: Thu, 31 Jan 2008 11:12:11 -0500 From: John Baldwin <jhb@freebsd.org> To: freebsd-stable@freebsd.org Cc: Andriy Gapon <avg@icyb.net.ua> Subject: Re: kld regression Message-ID: <200801311112.11682.jhb@freebsd.org> In-Reply-To: <47A1C198.6090802@icyb.net.ua> References: <47A0B642.9060000@icyb.net.ua> <200801310607.55346.jhb@freebsd.org> <47A1C198.6090802@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 31 January 2008 07:39:52 am Andriy Gapon wrote: > on 31/01/2008 13:07 John Baldwin said the following: > > On Wednesday 30 January 2008 12:39:14 pm Andriy Gapon wrote: > >> The problem is as follows: > >> 1. put udf_load="YES" in loader.conf > >> 2. you can mount and unmount udf filesystems > >> 3. you can kldunload udf if no udf filesystems are mounted > >> 4. now mount udf fs while udf.ko is unloaded > >> 5. udf is auto loaded and fs is mounted > >> 6. unmount fs > >> 7. try to kldunload udf > >> kldunload: can't unload file: Device busy > >> kernel message: kldunload: attempt to unload file that was loaded by the > >> kernel > >> > >> Yeah, it was loaded by kernel indeed, but WTF - what is the difference > >> from manual/loader.conf loading and why I can not manage my modules as I > >> wish? > > > > Hmm, the relevant code (vfs_init.c) hasn't changed in 6.x since 6.0. There > > were some changes in 7.0, but this should work in both branches. What is the > > previous release that this worked on? > > > > Maybe I was wrong when I called this regression, but this was very > surprising behavior for me. And in 5.X I did a lot of udf > debugging/experimenting and never encountered such a problem. Maybe I > always did kldload before mount, I can't tell now. > Anyway, this seems like an annoyance at the very least, pinning a kernel > module without any important reasons. It should work. It should definitely work in 7.0, and it should even work in 6.x though a bit more dubiously. Maybe hack your kernel to return userrefs instead of 'refs' for kldstat and see what userrefs is after you do a mount of udf and rely on the autoload. It should be 1 which means you can kldunload it (and refs should be 1 as well). -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801311112.11682.jhb>