Date: Wed, 04 Dec 2002 18:46:35 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: Tim Robbins <tjr@freebsd.org> Cc: freebsd-fs@freebsd.org Subject: Re: vflush() and dependencies between vnodes Message-ID: <3DEEBE0B.CA5156EE@mindspring.com> References: <20021205131858.A54625@dilbert.robbins.dropbear.id.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DEEBE0B.CA5156EE>