From owner-freebsd-hackers Mon Apr 26 9:12:30 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 5E6E9152AA for ; Mon, 26 Apr 1999 09:12:06 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id MAA15096; Mon, 26 Apr 1999 12:12:05 -0400 (EDT) (envelope-from luoqi) Date: Mon, 26 Apr 1999 12:12:05 -0400 (EDT) From: Luoqi Chen Message-Id: <199904261612.MAA15096@lor.watermarkgroup.com> To: freebsd-hackers@FreeBSD.ORG, zzhang@cs.binghamton.edu Subject: Re: Logical block number caching Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The 4.4BSD book says the following on page 227: > > The drawback to using a *logical* address cache is that it is difficult to > detect aliases for a block belonging to a local file and the same block > accessed through the block device disk whose logical block address is the > same as the physical block address. The kernel handles these aliases by > administratively preventing them from occuring. The kernel does not allow > the block device for a partition to be opened while that partition is > mounted and vice versa. > > Is this the same situation with FreeBSD 3.1? I have tried to find where in > the source code this gets handled without luck. I hope someone will tell > me whether FreeBSD uses the same strategy and which routines handle this. > > Any help is appreciated. > > -------------------------------------------------- > Zhihui Zhang. Please visit http://www.freebsd.org > -------------------------------------------------- > I believe it still applies to FreeBSD. The code that prevents mounted block device from being opened is in miscfs/specfs/spec_vnops.c -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message