From owner-freebsd-fs@FreeBSD.ORG Sun Apr 22 21:21:03 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABA33106564A; Sun, 22 Apr 2012 21:21:03 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 28ADB8FC12; Sun, 22 Apr 2012 21:21:02 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q3MLL2S4067134; Sun, 22 Apr 2012 23:21:02 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q3MLL2fr067133; Sun, 22 Apr 2012 23:21:02 +0200 (CEST) (envelope-from marius) Date: Sun, 22 Apr 2012 23:21:02 +0200 From: Marius Strobl To: Andriy Gapon Message-ID: <20120422212102.GA66855@alchemy.franken.de> References: <4F8999D2.1080902@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F8999D2.1080902@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: [review request] zfsboot/zfsloader: support accessing filesystems within a pool X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:21:03 -0000 On Sat, Apr 14, 2012 at 06:37:54PM +0300, Andriy Gapon wrote: > > I would like to ask for a review and/or testing of the following three patches: > http://people.freebsd.org/~avg/zfsboot.patches.diff > > These patches add support for booting from an arbitrary filesystem of any > detected ZFS pool. A filesystem could be selected in zfsboot and thus will > affectfrom where zfsloader would be loaded. zfsboot passes information about > the boot pool and filesystem to zfsloader, which uses those for loaddev and > default value of currdev. A different pool+filesystem could be selected in > zfsloader for booting kernel. Also if vfs.root.mountfrom is not explicitly set > and is not derived from fstab, then it gets set to the selected boot filesystem. > > This should could be used as a foundation for the support of Solaris-like boot > environment selection. I believe that other people have already developed > scripts utilizing ZFS capabilities to provide other aspects of management of > boot environments. > > I am particularly interested in reviews of my attempt to make ZFS boot support > arch-independent. The arches, of course, would have to add some code to make > use of that support. Currently I only enabled it for x86. > I can't say much about these patches as a whole as they are rather big and I'm not aware of all the details of ZFS. However, one bit that makes the current implementation x86-specific is zfs_dev_init(). If you could move it to the MD part in the course of these patches that would be great. If you could also take the second patch in PR 165025 into account, which I plan to commit once the issue with the current ofw_disk.c are properly solved, that would be great. Marius