Date: Tue, 26 Apr 2011 22:52:37 -0600 From: Warner Losh <imp@bsdimp.com> To: Bartosz Fabianowski <freebsd@chillt.de> Cc: Kostik Belousov <kostikbel@gmail.com>, freebsd-hackers@freebsd.org, Hans Petter Selasky <hselasky@c2i.net> Subject: Re: Is there some implicit locking of device methods? Message-ID: <52F5A9FB-8771-4002-B6C0-563679CCB355@bsdimp.com> In-Reply-To: <4DB76085.4000402@chillt.de> References: <4DB695DB.1080505@chillt.de> <201104261217.23858.hselasky@c2i.net> <4DB6BCC6.5050001@chillt.de> <20110426124403.GQ48734@deviant.kiev.zoral.com.ua> <4DB76085.4000402@chillt.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 26, 2011, at 6:17 PM, Bartosz Fabianowski wrote: >> If you needs per-file private data for cdev, you would be better = served >> by cdevpriv(9) KPI. Cloning is too hard to use correctly for such = task. >=20 > Thanks, I just got that working. To help those going down a similar = path in the future, I would like to note quickly that the following must = be added to the cdevsw structure to ensure proper clean-up: >=20 > .d_flags =3D D_TRACKCLOSE >=20 > I just spent hours debugging panics until I realized only the last = close() was triggering a call to my .d_close method. Traditional BSD behavior... Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52F5A9FB-8771-4002-B6C0-563679CCB355>