Subject: Re: IO ridiculously slow during newfs
To: gabriel rosenkoetter <gr@eclipsed.net>
From: Luke Mewburn <lukem@wasabisystems.com>
List: current-users
Date: 09/09/2001 19:36:23
On Sat, Sep 08, 2001 at 04:32:27PM -0400, gabriel rosenkoetter wrote:
> On Fri, Sep 07, 2001 at 08:56:26PM +0200, Ignatios Souvatzis wrote:
> > Now, this is a bad idea --- you might even want to newfs a plain file.
> 
> Um... you can't do that, right now, can you?
> 
> I mean, word on the street is that lukem's working on a way to do
> this, but so far as I know, the only ways to create a file system
> within a plain file are to use mkisofs, to do newfs on an mfs
> that's a mmap()ed file (or something similar), or to play with vnd,
> but in all of these cases you're at least dealing with a pseudo
> device whos character version you're welcome to write all over.
> 
> Am I confused?

Yes (slightly :-).

In -current, "newfs -F -s size file" will work on a regular file, and if
you give it -Z, it will pre-zero the image first (which is needed if the
image file is to be used behind a vnd, because vnd(4) doesn't like files
with holes).


I also have a working tool ("makefs") which currently builds an ffs
image in a similar way that mkisofs can build ISO CD images, although
makefs is modular and easily allows for support for different file
systems to be grafted in as separate chunks of code.  makefs will soon
be part of NetBSD and be used in the build process as a replacement
for the use of a vnd(4), because vnd's require root on NetBSD, and
both of those conditions are not conducive to cross-compilation
environments.

Luke.