From owner-freebsd-fs Wed Dec 4 18:48: 0 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9027937B401; Wed, 4 Dec 2002 18:47:59 -0800 (PST) Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id D794343EC5; Wed, 4 Dec 2002 18:47:57 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0353.cvx40-bradley.dialup.earthlink.net ([216.244.43.98] helo=mindspring.com) by albatross.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 18Jm3Q-00046m-00; Wed, 04 Dec 2002 18:47:57 -0800 Message-ID: <3DEEBE0B.CA5156EE@mindspring.com> Date: Wed, 04 Dec 2002 18:46:35 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Tim Robbins Cc: freebsd-fs@freebsd.org Subject: Re: vflush() and dependencies between vnodes References: <20021205131858.A54625@dilbert.robbins.dropbear.id.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Tim Robbins wrote: > smbfs stores a pointer to each file or directory's parent directory in > the smbnode struct and vref()'s the parent directory's vnode. This means > that an smbfs directory vnode cannot be removed before all of its > children have vrele()'d it. However, vflush() iterates through the > mount's vnode list from start to end, so if a directory vnode appears > in the list before its children, it will not be removed. This causes a > panic when umount -f is used because smbfs_reclaim() calls vrele() on the > parent vnode after it has already been freed. This also causes umount > without -f to erroneously return EBUSY. > > Can anyone think of a better way to solve this problem than to keep > rescanning the mount's vnode list until no more vnodes can be freed, > like the patch below does? Yes. Let SMBFS own its own vnodes, instead of renting them from the system vnode pool. Problem solved. Personally, I think your patch is "good enough". -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message