From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 27 10:37:36 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB398106564A; Fri, 27 Apr 2012 10:37:36 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mail.kirov.so-ups.ru (mail.kirov.so-ups.ru [178.74.170.1]) by mx1.freebsd.org (Postfix) with ESMTP id 813B18FC08; Fri, 27 Apr 2012 10:37:36 +0000 (UTC) Received: from kas30pipe.localhost (localhost.kirov.so-ups.ru [127.0.0.1]) by mail.kirov.so-ups.ru (Postfix) with SMTP id ADFCCB801B; Fri, 27 Apr 2012 14:37:25 +0400 (MSK) Received: from kirov.so-ups.ru (unknown [172.21.81.1]) by mail.kirov.so-ups.ru (Postfix) with ESMTP id A82F0B8008; Fri, 27 Apr 2012 14:37:25 +0400 (MSK) Received: by ns.kirov.so-ups.ru (Postfix, from userid 1010) id A14B8BA022; Fri, 27 Apr 2012 14:37:25 +0400 (MSK) Received: from [127.0.0.1] (unknown [10.118.3.52]) by ns.kirov.so-ups.ru (Postfix) with ESMTP id 682B9BA01D; Fri, 27 Apr 2012 14:37:25 +0400 (MSK) Message-ID: <4F9A76E5.7000809@FreeBSD.org> Date: Fri, 27 Apr 2012 14:37:25 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Andriy Gapon References: <4F8999D2.1080902@FreeBSD.org> <20120422212102.GA66855@alchemy.franken.de> <4F94F56E.1010501@FreeBSD.org> <4F9A6369.5060305@FreeBSD.org> In-Reply-To: <4F9A6369.5060305@FreeBSD.org> X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release X-SpamTest-Info: Not protected Cc: freebsd-fs@FreeBSD.org, freebsd-hackers@FreeBSD.org, John Baldwin , Marius Strobl Subject: Re: [review request] zfsboot/zfsloader: support accessing filesystems within a pool X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 10:37:37 -0000 On 27.04.2012 13:14, Andriy Gapon wrote: >> I also have some WIP related to moving partition table handling into MD Oh, i did mean MI part. >> part. You can look here: http://people.freebsd.org/~ae/sys_boot.diff > > I like this patch. OTOH, I couldn't help by wonder if it is possible to > somehow directly re-use the results of dv_init probing by other drivers (or > subset of the drivers, like only 'disk'). E.g. if instead of re-examining the > partition tables, we could ask a driver for a list of devices that it discovered. > But how to do that is not something that I can answer. 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. -- WBR, Andrey V. Elsukov