From owner-svn-src-all@FreeBSD.ORG Wed Sep 15 15:11:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAD531065673; Wed, 15 Sep 2010 15:11:20 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from mail1.sandvine.com (Mail1.sandvine.com [64.7.137.134]) by mx1.freebsd.org (Postfix) with ESMTP id 871988FC0C; Wed, 15 Sep 2010 15:11:20 +0000 (UTC) Received: from labgw2.phaedrus.sandvine.com (192.168.222.22) by WTL-EXCH-1.sandvine.com (192.168.196.31) with Microsoft SMTP Server id 14.0.694.0; Wed, 15 Sep 2010 11:11:19 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 10332) id 9F9D733C00; Wed, 15 Sep 2010 11:11:19 -0400 (EDT) Date: Wed, 15 Sep 2010 11:11:19 -0400 From: Ed Maste To: Attilio Rao Message-ID: <20100915151119.GB1522@sandvine.com> References: <201009151424.o8FEOLZE039185@svn.freebsd.org> <20100915145209.GK2465@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212661 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 15:11:20 -0000 On Wed, Sep 15, 2010 at 04:57:15PM +0200, Attilio Rao wrote: > 2010/9/15 Kostik Belousov : > > 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. Yeah, the old code in aac(4) meant that the module couldn't be unloaded after running the arcconf management tool. This change at least works for the common cases. The mfi(4) driver has a similar local refcount / prevent unload test, and I imagine many other drivers want to implement the same functionality. -Ed