Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 2004 19:14:11 +0200
From:      Poul-Henning Kamp <phk@phk.freebsd.dk>
To:        geom@freebsd.org
Subject:   GEOM class idea...
Message-ID:  <87385.1087146851@critter.freebsd.dk>

next in thread | raw e-mail | index | archive | help

OK, here is one of the more nasty ideas for a GEOM class:

Many of us read CD's into iso images, stick them on a harddisk and
mount them from there when we need to access them.  This usually
costs us a md(4) vnode gadget, and that is really a waste.

Write a GEOM class which is a slicer, but it needs to work on CD9660
image headers as metadata, and work the following way:

Read in the first ISO image onto our archive disk:

	dd if=/dev/acd0 of=/dev/ad8 bs=2k

On close, the disk is tasted, and our "geom_cdarch" class finds a
valid CD9660 volume description and attaches to the disk.

It extracts the image size from the CD9660 descriptor (offset 0x8050,
32bitLE.  Repeated at 0x8054 as 32bitBE) and creates a slice with
this ISO image in it.

Since there is no valid CD9660 descriptor on the disk right after
this image, the remaining free space gets put into a special
slice ("ad8.freespace").

To read in the next ISO image:

	dd if=/dev/acd0 of=/dev/ad8.freespace bs=2k

On close the geom_cdarch class looks for a valid CD9660 volume and
if it finds one, creates a new slice and recreates the freespace
slice with the space now available, and we can repeat the process
until we run out of space.

Any takers ?


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87385.1087146851>