Subject: Re: puvnd (pass to userland vnd)?
To: Dieter Baron <dillo@NetBSD.org>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 03/08/2007 16:13:03
On Mar 8, 2007, at 3:25 PM, Dieter Baron wrote:
> my goal is to enhance vnd(4) to support UDIF (Apple's Universal Disk
> Image Format; the format .dmg files use). This format compresses
> chunks (usually 128kb) of the disk, similar to CLOOP2 we already
> support. It can use zlib or bzip2, and has support for AES-128
> encryption.
Way cool. I would like to see in-tree tools for creating DMGs, too.
For reasons that may be obvious to some (:-), I use DMGs a lot, and
would love to be able to use them on NetBSD.
OS X, FWIW, has a hybrid approach. Un-encrypted / un-compressed DMGs
are handled entirely in the kernel-resident driver, IIRC, and stuff is
only passed to userland if it is necessary to do so.
>
>
> Should I add support for this inside the kernel, by adding it to
> vnd.c?
>
> Or is it preferable to have the ability to pass block read/write
> requests to a vnd to a user land process, similar to what puffs does
> for file systems? That way, we could more easily add support for
> various other image formats, like those used by VMware or qemu. (As a
> side note, this is how Mac OS X's support for UDIF works.)
I think it would be useful for having a pass-off-to-userland
interface. I think with some trickery, you could make it zero-copy,
too.
-- thorpej