Subject: Re: nullfs mounts
To: Matthew Mondor <email@example.com>
From: Andrew Brown <firstname.lastname@example.org>
Date: 01/18/2003 01:36:00
>> > Mounting a nullfs filesystem with an non-absolute mountpoint results
>> > in a parmanent mount entry which umount cannot handle anymore.
>> See umount's -R option.
>Ah interesting, thanks. So it was part of nullfs design decisions to make
>no path sanity checking at all? Perhaps we could make it at least check
>for extra '/'s, and non-absolute paths or such?
it's not really a nullfs thing, iirc, but a weirdness of mount/umount
>Possibly indirectly related to this I noticed that reverse name cache for
>inode->filename can only optionally be enabled with NAMECACHE_ENTER_REVERSE
>at kernel compilation time, and that it only seems to apply to linux procfs
>simulation for memory maps display. I thought that it might be useful if
>fstat(1) could optionally benefit from that as well, with a new flag...
it *might* be useful, if there was some sort of interface to that sort
of thing from userland, but there ain't. at least, not that i know
note also, that even if you enable it, the /proc/$$/maps file will not
show the pathnames. at least, the last time i checked. perhaps
someone has fixed it.
the two programs that i know of that do print pathnames are lsof and
pmap. they both grovel through kmem looking for the stuff and
reconstruct the path manually after all the cached data has been
sucked out. it's not exactly trivial, though if you want to look at
how it's done, read the pmap code. the lsof code on the other hand,
at the unfortunate cost of some readability, is decidely more
>Or are only library filenames reversed in the name cache? I couldn't check
>the source about this yet...
the NAMECACHE_ENTER_REVERSE option make the inverse cache the same
size as the forward cache, and causes all entries to be recorded,
instead of simply directory entries. so...files, devices,
directories, etc. not just libraries.
|-----< "CODE WARRIOR" >-----|
email@example.com * "ah! i see you have the internet
firstname.lastname@example.org (Andrew Brown) that goes *ping*!"
email@example.com * "information is power -- share the wealth."