Date: Mon, 28 Apr 2008 17:10:29 +0900 From: Daichi GOTO <daichi@freebsd.org> To: Kostik Belousov <kostikbel@gmail.com> Cc: fs@freebsd.org Subject: Re: Approval request of some additions to src/sys/kern/vfs_subr.c and src/sys/sys/vnode.h Message-ID: <48158675.1060809@freebsd.org> In-Reply-To: <20080426100116.GL18958@deviant.kiev.zoral.com.ua> References: <4811B0A0.8040702@freebsd.org> <20080426100116.GL18958@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Kostik Belousov wrote: > On Fri, Apr 25, 2008 at 07:21:20PM +0900, Daichi GOTO wrote: >> Hi Konstantin :) >> >> To fix a unionfs issue of http://www.freebsd.org/cgi/query-pr.cgi?pr=109377, >> we need to add new functions >> >> void vkernrele(struct vnode *vp); >> void vkernref(struct vnode *vp); >> >> and one value >> >> int v_kernusecount; /* i ref count of kernel */ >> >> to src/sys/sys/vnode.h and rc/sys/kern/vfs_subr.c. >> >> Unionfs will be panic when lower fs layer is forced umounted by >> "umount -f". So to avoid this issue, we've added >> "v_kernusecount" value that means "a vnode count that kernel are >> using". vkernrele() and vkernref() are functions that manage >> "v_kernusecount" value. >> >> Please check those and give us an approve or some comments! > > There is already the vnode reference count. From your description, I cannot > understand how the kernusecount would prevent the panic when forced unmount > is performed. Could you, please, show the actual code ? PR mentioned > does not contain any patch. Oops, sorry. patch is follow: http://people.freebsd.org/~daichi/unionfs/experiments/unionfs-p20-3.diff > The problem you described is common for the kernel code, and right way > to handle it, for now, is to keep refcount _and_ check for the forced > reclaim. -- Daichi GOTO, http://people.freebsd.org/~daichi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48158675.1060809>