Re: vnode leak in FFS code ... ?

From: Uwe Doering <gemini_at_geminix.org>
Date: Sat, 04 Sep 2004 23:40:13 +0200
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
-- 
Uwe Doering         |  EscapeBox - Managed On-Demand UNIX Servers
gemini_at_geminix.org  |  http://www.escapebox.net
Received on Sat Sep 04 2004 - 19:40:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:10 UTC