Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jun 1998 17:34:37 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        fs@FreeBSD.ORG, phk@FreeBSD.ORG
Subject:   Re: specfs oddity...
Message-ID:  <199806270734.RAA02480@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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



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