Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2012 17:07:06 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        "Andrey V. Elsukov" <ae@FreeBSD.org>
Cc:        freebsd-fs@FreeBSD.org, freebsd-hackers@FreeBSD.org, John Baldwin <jhb@FreeBSD.org>, Marius Strobl <marius@alchemy.franken.de>
Subject:   Re: [review request] zfsboot/zfsloader: support accessing filesystems within a pool
Message-ID:  <4F9AA80A.6040506@FreeBSD.org>
In-Reply-To: <4F9A76E5.7000809@FreeBSD.org>
References:  <4F8999D2.1080902@FreeBSD.org> <20120422212102.GA66855@alchemy.franken.de> <4F94F56E.1010501@FreeBSD.org> <4F9A6369.5060305@FreeBSD.org> <4F9A76E5.7000809@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 27/04/2012 13:37 Andrey V. Elsukov said the following:
> What you think about this concept:
> We can implement some MI API to query disks count and each disk parameters (mediasize,
> sectorsize). This MI code will use some IOCTL that will act with MD "disk"'s devsw->ioctl.
> 
> devicename.c functions can be changed to use MI DISK API together with PART API,
> or maybe even moved to the MI code.
> 
> In the result we will have some MI API to get access to the disks and partitions,
> that we can use anywhere, e.g. in the ZFS code.

Sorry, but I couldn't understand your design.  Probably I am missing the bigger
picture.

I think that for ZFS case it would be sufficient to be able to iterate over
detected device names or devspecs.  Size and other disk properties do not seem to
be needed.  Unless I am mistaken, of course.
E.g. something akin to what bd_print (dv_print, in the general case) does but
oriented towards programmatic use rather than end-user.  Maybe all that partition
table parsing should be done only once (e.g. in the init method) and the result
should be saved.

-- 
Andriy Gapon



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