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 
all other callers.

=========================================================================
For RAIDANT status see: 
http://cranford.eng.netapp.com:8015/ant3/index.cgi
To submit RAIDANT test descriptions go to:
http://web.netapp.com/engineering/projects/raidv2/testing/ 
Ontap on the web:
http://web.netapp.com/engineering/projects/raidv2/testing/global/ 

On Mon, 11 Feb 2002, [ISO-8859-2] Paweł Jakub Dawidek wrote:

> Hi.
> 
> 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)
> {
> [...]
> 	long finode = 0;
> 	struct nameidata nd, *ndptr;
> [...]
> 	ndptr = &nd;
> 	NDINIT(ndptr, LOOKUP, FOLLOW | SAVENAME, UIO_USERSPACE, ea->path, p);
> 	if (!namei(ndptr))
> 		if (!VOP_GETATTR(ndptr->ni_vp, &va, p->p_ucred, p))
> 			finode = va.va_fileid;
> [...]
> }
> 
> 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:
> [...]
> 	return open(p, ea);
> 	if (!namei(ndptr))
> [...]
> Everything is oke, but:
> 	namei(ndptr)
> 	return open(p, ea);
> isn't.
> % mpg123 some.mp3
> Can't open /dev/dsp!
> 
> And /dev/dsp is completely fucked up, it is still busy even if I unload my
> module. Only reboot can free it.
> 
> So what's going on?
> Or maybe there is some other way to get file inode?
> 
> -- 
> Paweł Jakub Dawidek
> Network Administrator.
> Am I Evil? Yes, I Am.
> 


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>