Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Feb 2002 00:46:47 -0800 (PST)
From:      Kip Macy <kmacy@netapp.com>
To:        =?ISO-8859-2?Q?Pawe=B3_Jakub_Dawidek?= <nick@garage.freebsd.pl>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Devices and namei(9).
Message-ID:  <Pine.GSO.4.10.10202110045090.11010-100000@cranford>
In-Reply-To: <20020211094049.B251@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10202110045090.11010-100000>