From owner-freebsd-current@FreeBSD.ORG Sat Dec 20 15:48:02 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F23661065670; Sat, 20 Dec 2008 15:48:02 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from sakura.ninth-nine.com (unknown [IPv6:2001:2f0:104:80a0:230:48ff:fe41:2455]) by mx1.freebsd.org (Postfix) with ESMTP id 741368FC19; Sat, 20 Dec 2008 15:48:02 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.14.1/8.14.1/NinthNine) with SMTP id mBKFm0jW022014; Sun, 21 Dec 2008 00:48:00 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Sun, 21 Dec 2008 00:47:59 +0900 From: Norikatsu Shigemura To: Doug Rabson Message-Id: <20081221004759.6315d12f.nork@FreeBSD.org> X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.11; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (sakura.ninth-nine.com [219.127.74.121]); Sun, 21 Dec 2008 00:48:01 +0900 (JST) Cc: freebsd-current@FreeBSD.org, nork@FreeBSD.org Subject: some requests for ZFS X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Dec 2008 15:48:03 -0000 Hi Doug! I confirmed that your zfsboot code is good on my i386/amd64 note PCs after r186243! Thanks for your works! I have two requests: 1. To support zpool for lsdev like following. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OK lsdev -v cd devices: disk devices: disk0: BIOS drive C: disk0s1a: ZFS 72GB (63 - 151048055) disk0s1b: swap 5120MB (302096047 - 312581808) disk0s1a: ZFS 72GB (151048055 - 302096047) pxe devices: zfs devices: pool: tank config: NAME STATE tank ONLINE ad4s1a ONLINE OK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2. To support case of "slice has only zpool and no bsd partition". - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # zpool create tank ad0s1 and boot from ad0s1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SEE ALSO: http://lists.freebsd.org/pipermail/freebsd-fs/2008-July/004895.html --- sys/boot/i386/libi386/biosdisk.c.orig 2008-11-20 01:04:07.000000000 +0900 +++ sys/boot/i386/libi386/biosdisk.c 2008-11-21 02:00:56.078793628 +0900 @@ -469,6 +469,7 @@ * unused. */ if ((lp->d_partitions[i].p_fstype == FS_BSDFFS) || + (lp->d_partitions[i].p_fstype == FS_ZFS) || (lp->d_partitions[i].p_fstype == FS_SWAP) || (lp->d_partitions[i].p_fstype == FS_VINUM) || ((lp->d_partitions[i].p_fstype == FS_UNUSED) && @@ -477,6 +478,7 @@ /* Only print out statistics in verbose mode */ if (verbose) sprintf(line, " %s%c: %s %s (%d - %d)\n", prefix, 'a' + i, + (lp->d_partitions[i].p_fstype == FS_ZFS) ? "ZFS " : (lp->d_partitions[i].p_fstype == FS_SWAP) ? "swap " : (lp->d_partitions[i].p_fstype == FS_VINUM) ? "vinum" : "FFS ", @@ -485,6 +487,7 @@ lp->d_partitions[i].p_offset + lp->d_partitions[i].p_size); else sprintf(line, " %s%c: %s\n", prefix, 'a' + i, + (lp->d_partitions[i].p_fstype == FS_ZFS) ? "ZFS" : (lp->d_partitions[i].p_fstype == FS_SWAP) ? "swap" : (lp->d_partitions[i].p_fstype == FS_VINUM) ? "vinum" : "FFS"); @@ -696,7 +699,8 @@ if (lp->d_magic != DISKMAGIC) { DEBUG("no disklabel"); - return (ENOENT); + od->od_flags &= ~BD_LABELOK; + od->od_boff = sector; /* no partition, must be after the slice */ } if (dev->d_kind.biosdisk.partition >= lp->d_npartitions) { DEBUG("partition '%c' exceeds partitions in table (a-'%c')",