From owner-freebsd-fs Sat Jun 27 00:34:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA00843 for freebsd-fs-outgoing; Sat, 27 Jun 1998 00:34:48 -0700 (PDT) (envelope-from owner-freebsd-fs@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA00833; Sat, 27 Jun 1998 00:34:40 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id RAA02480; Sat, 27 Jun 1998 17:34:37 +1000 Date: Sat, 27 Jun 1998 17:34:37 +1000 From: Bruce Evans Message-Id: <199806270734.RAA02480@godzilla.zeta.org.au> To: fs@FreeBSD.ORG, phk@FreeBSD.ORG Subject: Re: specfs oddity... Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Does anybody know why spec_open for VCHR devices does a VOP_UNLOCK() / >vn_lock(vp, LK_EXCLUSIVE) around the devicedriver open routine but >doesn't do it for VBLK devices ? I think the vnode is left locked for bdev opens because unlocking would allow the !vfs_mountedon(vp) condition to change underneath. The vnode obviously has to be kept locked for bdev reads and writes because the inner i/o function (bread/bwrite) depends on the vnode. Unlocking/not locking is apparently safe for the other specfs operations (ioctls and closes are not locked to begin with). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message