From owner-freebsd-hackers Thu Feb 3 1:26:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gvr.gvr.org (gvr.gvr.org [194.151.74.97]) by builder.freebsd.org (Postfix) with ESMTP id 4B4D24305 for ; Thu, 3 Feb 2000 01:26:10 -0800 (PST) Received: by gvr.gvr.org (Postfix, from userid 657) id 9499AA85A; Thu, 3 Feb 2000 10:26:15 +0100 (CET) Date: Thu, 3 Feb 2000 10:26:15 +0100 From: Guido van Rooij To: freebsd-hackers@freebsd.org Subject: open ref counts in CAM and vn Message-ID: <20000203102615.A64986@gvr.gvr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A collegue fo mine had the problem that it was possible to vnconfig -u a vn device that was currently in use. This strikes me as odd. When looking through the da device code, I notice a similar problem. Suppose I have a zip fdisk mounted with a disklabel and 2 ufs partitions on it. When I mount both partitions, the disk will be locked. But it will be unlocked at the first unmount. I guess there should be a refcounter that keeps track of the amount of opens and only unlock devices at the last close. Same for vn.c. Any comments? -Guido To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message