Date: Sat, 26 Apr 2008 13:01:16 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Daichi GOTO <daichi@freebsd.org> 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: <20080426100116.GL18958@deviant.kiev.zoral.com.ua> In-Reply-To: <4811B0A0.8040702@freebsd.org> References: <4811B0A0.8040702@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--1ybh4W+c0/0dBCW4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 25, 2008 at 07:21:20PM +0900, Daichi GOTO wrote: > Hi Konstantin :) >=20 > To fix a unionfs issue of http://www.freebsd.org/cgi/query-pr.cgi?pr=3D10= 9377, > we need to add new functions >=20 > void vkernrele(struct vnode *vp); > void vkernref(struct vnode *vp); >=20 > and one value >=20 > int v_kernusecount; /* i ref count of kernel */ >=20 > to src/sys/sys/vnode.h and rc/sys/kern/vfs_subr.c. >=20 > 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. >=20 > 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. 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. --1ybh4W+c0/0dBCW4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkgS/WwACgkQC3+MBN1Mb4jEigCg6aLQtsufutJxtrBMQKGe9F+F DvIAnRrdIz0B1f9Tx8kWxDAV6zXubt9N =Rrhi -----END PGP SIGNATURE----- --1ybh4W+c0/0dBCW4--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080426100116.GL18958>