From owner-freebsd-hackers Mon Feb 11 0:47:16 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx01-a.netapp.com (mx01-a.netapp.com [198.95.226.53]) by hub.freebsd.org (Postfix) with ESMTP id D85EE37B419 for ; Mon, 11 Feb 2002 00:47:02 -0800 (PST) Received: from frejya.corp.netapp.com (frejya [10.10.20.91]) by mx01-a.netapp.com (8.11.1/8.11.1/NTAP-1.2) with ESMTP id g1B8kn320817; Mon, 11 Feb 2002 00:46:49 -0800 (PST) Received: from cranford-be.eng (localhost [127.0.0.1]) by frejya.corp.netapp.com (8.12.2/8.12.2/NTAP-1.4) with ESMTP id g1B8kmej024149; Mon, 11 Feb 2002 00:46:48 -0800 (PST) Received: from localhost (kmacy@localhost) by cranford-be.eng (8.10.2+Sun/8.10.2) with ESMTP id g1B8klu15136; Mon, 11 Feb 2002 00:46:48 -0800 (PST) Date: Mon, 11 Feb 2002 00:46:47 -0800 (PST) From: Kip Macy To: =?ISO-8859-2?Q?Pawe=B3_Jakub_Dawidek?= Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Devices and namei(9). In-Reply-To: <20020211094049.B251@garage.freebsd.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I don't see any reference to you calling vrele or vput. Without that the reference count won't be decreased and the vnode will continue to be locked= for=20 all other callers. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D For RAIDANT status see:=20 http://cranford.eng.netapp.com:8015/ant3/index.cgi To submit RAIDANT test descriptions go to: http://web.netapp.com/engineering/projects/raidv2/testing/=20 Ontap on the web: http://web.netapp.com/engineering/projects/raidv2/testing/global/=20 On Mon, 11 Feb 2002, [ISO-8859-2] Pawe=B3 Jakub Dawidek wrote: > Hi. >=20 > I got problem with namei(9) and some devices. > Example (catching syscall open()): > static int > n_open(register struct proc *p, register struct open_args *ea) > { > [...] > =09long finode =3D 0; > =09struct nameidata nd, *ndptr; > [...] > =09ndptr =3D &nd; > =09NDINIT(ndptr, LOOKUP, FOLLOW | SAVENAME, UIO_USERSPACE, ea->path, p); > =09if (!namei(ndptr)) > =09=09if (!VOP_GETATTR(ndptr->ni_vp, &va, p->p_ucred, p)) > =09=09=09finode =3D va.va_fileid; > [...] > } >=20 > I use namei() coz i want file inode. > But when namei() will be called some devices are blocking. > For example if I do in this way: > [...] > =09return open(p, ea); > =09if (!namei(ndptr)) > [...] > Everything is oke, but: > =09namei(ndptr) > =09return open(p, ea); > isn't. > % mpg123 some.mp3 > Can't open /dev/dsp! >=20 > And /dev/dsp is completely fucked up, it is still busy even if I unload m= y > module. Only reboot can free it. >=20 > So what's going on? > Or maybe there is some other way to get file inode? >=20 > --=20 > Pawe=B3 Jakub Dawidek > Network Administrator. > Am I Evil? Yes, I Am. >=20 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message