Subject: Re: vnd questions
To: None <tech-kern@NetBSD.ORG>
From: Christoph Badura <bad@ora.de>
List: tech-kern
Date: 02/15/1998 23:53:54
gson@araneus.fi (Andreas Gustafsson) wrote:

>I have two questions regarding the vnd driver in NetBSD 1.3:

>1. What exactly is the "historical reason" referred to in
>the following comment in /usr/src/sys/dev/vnd.c?

I'm afraid I can't help you with that question.  Jason?

>2.  What exactly does the following line in /usr/src/distrib/miniroot/Makefile
>(and several other distrib Makefiles) do?

>	cat /*bin/* > /dev/null

This tries to flush the first block of the vnd file from the buffer
cache.  vnd needs to set up credentials for the vnode of the underlying
file.  This is done at the cost of reading the first block of the file
which is then cached in the buffer cache.  All further IO through vnd to
the file bypasses the buffer cache however, rendering the first block in the
buffer cache stale.

>I suspect the answer may include a reference to a deficiency of the
>vnd driver.  If so, shouldn't said deficiency be documented in the
>BUGS section of the vnd(4) man page?

This particular bug is fixed in -current and the soon to be release first
patch to 1.3.

It's not a good idea, however, to access the underlying file while the vnd
is in use.
-- 
Christoph Badura

Now available in print: Lion's Commentary on UNIX 6th Edition, with Source Code
			http://www.peer-to-peer.com/