vnode leak in FFS code ... ?
gemini at geminix.org
Sat Sep 4 14:40:18 PDT 2004
Matthew Dillon wrote:
> [cached union FS vnodes keeping vnodes of underlying FS referenced]
> An easy way to fix this, presuming that there are no bugs in unionfs
> keeping the underlying vnode from being dereferenced, is to have a
> system call which explicitly flushes all the vnodes with no references
> associated with a mount point. You could then flush the unionfs mounts
> in order to synchronize the destruction of removed files & directories
> in underlying filesystems. You could do this once an hour or so to
> greatly reduce the instances of 0-length directories.
It's an incredible hack, but try this:
cd /path/to/fs && umount /path/to/fs >/dev/null 2>&1
Fails of course, but reliably blows away all cached unreferenced vnodes
associated with the respective mount point, due to the way unmount(2) is
implemented in the kernel. Or at least in RELENG_4, that is. Can't
tell for CURRENT.
Uwe Doering | EscapeBox - Managed On-Demand UNIX Servers
gemini at geminix.org | http://www.escapebox.net
More information about the freebsd-current