Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Sep 2010 12:14:33 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        Attilio Rao <attilio@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r212661 - head/sys/dev/aac
Message-ID:  <201009151214.33375.jhb@freebsd.org>
In-Reply-To: <20100915145209.GK2465@deviant.kiev.zoral.com.ua>
References:  <201009151424.o8FEOLZE039185@svn.freebsd.org> <20100915145209.GK2465@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, September 15, 2010 10:52:09 am Kostik Belousov wrote:
> On Wed, Sep 15, 2010 at 02:24:21PM +0000, Attilio Rao wrote:
> > Author: attilio
> > Date: Wed Sep 15 14:24:21 2010
> > New Revision: 212661
> > URL: http://svn.freebsd.org/changeset/base/212661
> > 
> > Log:
> >   Fix bogus busying mechanism from cdevsw callbacks:
> >   - D_TRACKCLOSE may be used there as d_close() are expected to match up
> >     d_open() calls
> VFS is not very good at properly calling VOP_CLOSE(). As example, premature
> vnode reclaim due to devfs unmount would cause VOP_CLOSE() to be called
> only once despite the number of opens being  > 1.

cdevpriv is probably a much better route for handling this than D_TRACKCLOSE.
The destructor routine passed to devfs_set_cdevpriv() would just do the work
of decrementing the reference count instead of actually freeing anything in
that case.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009151214.33375.jhb>