svn commit: r212661 - head/sys/dev/aac

Kostik Belousov kostikbel at gmail.com
Wed Sep 15 15:04:18 UTC 2010


On Wed, Sep 15, 2010 at 04:57:15PM +0200, Attilio Rao wrote:
> 2010/9/15 Kostik Belousov <kostikbel at gmail.com>:
> > 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.
> 
> Yes.
> That makes implementing a similar semantic in drivers very difficult
> and not very well fixable, in particular within the d_* callbacks.
> I'm seriously wondering if we might just make a shortcut just for
> supporting such a feature (busying the device on real devfs entry
> activity) as several of them may be needing and may be probabilly
> needing to be 100%.
> Luckilly, it seems that such paths are not experienced very frequently.

I am not sure what do you mean by "busying the device on real devfs entry
activity". Is the operation made by dev_refthread() and friends enough ?

Device cannot be destroyed by destroy_dev() until all threads leave the
cdevsw methods.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20100915/ae425742/attachment.pgp


More information about the svn-src-all mailing list