From owner-freebsd-stable@FreeBSD.ORG Sat Sep 4 21:40:18 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CADE16A4CE; Sat, 4 Sep 2004 21:40:18 +0000 (GMT) Received: from gen129.n001.c02.escapebox.net (gen129.n001.c02.escapebox.net [213.73.91.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E6E843D31; Sat, 4 Sep 2004 21:40:17 +0000 (GMT) (envelope-from gemini@geminix.org) Message-ID: <413A363D.5080306@geminix.org> Date: Sat, 04 Sep 2004 23:40:13 +0200 From: Uwe Doering Organization: Private UNIX Site User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040808 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <20040901151405.G47186@ganymede.hub.org> <20040901200257.GA92717@afields.ca><41365746.2030605@samsco.org> <20040901224632.O72978@ganymede.hub.org> <41394D0B.1050004@elischer.org> <20040904131131.A812@ganymede.hub.org> <200409041857.i84Ive1n046689@apollo.backplane.com> In-Reply-To: <200409041857.i84Ive1n046689@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Received: from gemini by geminix.org with asmtp (TLSv1:AES256-SHA:256) (Exim 3.36 #1) id 1C3iGd-0005x2-00; Sat, 04 Sep 2004 23:40:16 +0200 cc: freebsd-current@freebsd.org Subject: Re: vnode leak in FFS code ... ? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2004 21:40:18 -0000 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@geminix.org | http://www.escapebox.net