Pseudofs question

Aniruddha Bohra bohra at cs.rutgers.edu
Wed Mar 28 17:46:20 UTC 2007


Hi,
 Pseudofs handles the fileno allocation and deallocation using 
alloc_unr() and free_unr().

The fileno is allocated on demand when vn_readdir is called 
(pseudofs_vnops.c). However,
I could not find the deallocation in pseudofs.

So, when I unload my fs module, I get a crash with the unit busy:
kern/subr_unit.c:321         KASSERT(uh->busy == 0, ("unrhdr has %u 
allocations", uh->busy));

This is a good kassert as the pfs_fileno_free is never called.

Actually, the module unload function calls _fsname_uninit() which calls 
pfs_uninit() which calls
pfs_fileno_uninit(pi) without first destroying the file system or 
deallocating any allocated unit numbers.

Am I missing something obvious in my implementation since I do not see a 
similar crash with procfs :(

Thanks
Aniruddha



More information about the freebsd-fs mailing list