arch-independent disks in sys/boot, libstand
Doug Rabson
dfr at rabson.org
Wed May 11 17:10:50 UTC 2011
On 11 May 2011 06:43, Andriy Gapon <avg at freebsd.org> wrote:
> on 11/05/2011 12:16 Doug Rabson said the following:
> > There is an example of this in sys/boot/zfs. The approach taken is to
> scan
> > physical drives as they appear and piece them together into ZFS pools
> based on the
> > drive metadata. The pools appear as devices in the device table and the
> actual ZFS
> > filesystem reader is built on top of that.
>
> Yes, thank you, I've seen that code.
> My question was not specific enough - I am interested in the things like
> i386_fmtdev vs other archs, i386_parsedev vs other archs, struct
> i386_devdesc vs
> other archs, etc.
> I.e. I would like to make ZFS representable (in some shape) via struct
> devdesc.
> But it seems that every supported arch has its own extension of struct
> devdesc
> that it uses and its own set of functions to work with that struct.
> Or, using another example, I'd like to be able to specify something like
> "zfs:/pool/fs:/boot/kernel" as a kernel name and have that work for all
> archs.
> I'd hate to duplicate code that would handle that acress all xxx_parsedev
> implementations for all architectures.
>
The fmtdev/parsedev stuff is a huge mess. In many if not all cases, the
device and partition code is identical across the different arches and
should be shared.
More information about the freebsd-arch
mailing list