From owner-freebsd-fs@FreeBSD.ORG Tue Aug 5 15:46:04 2008 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D61F1106570A; Tue, 5 Aug 2008 15:46:04 +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 437628FC17; Tue, 5 Aug 2008 15:46:04 +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 m75FjvYI054299; Wed, 6 Aug 2008 00:45:57 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Wed, 6 Aug 2008 00:45:57 +0900 From: Norikatsu Shigemura To: Pawel Jakub Dawidek Message-Id: <20080806004557.6e538e5c.nork@FreeBSD.org> In-Reply-To: <20080731013229.9d342ee5.nork@FreeBSD.org> References: <20080727125413.GG1345@garage.freebsd.pl> <488F0C71.9010902@moneybookers.com> <20080729125551.GA70379@eos.sc1.parodius.com> <1217338852.10413.1.camel@dingo-laptop> <488F2078.708@psg.com> <1217347882.10413.5.camel@dingo-laptop> <20080729211137.GA52154@nobby.studby.ntnu.no> <20080731013229.9d342ee5.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]); Wed, 06 Aug 2008 00:45:58 +0900 (JST) X-Mailman-Approved-At: Tue, 05 Aug 2008 16:47:47 +0000 Cc: Randy Bush , Ulf Lilleengen , Jeremy Chadwick , Stefan, Norikatsu Shigemura , Lambrev , freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org, OutBackdingo Subject: Re: ZFS patches. 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: Tue, 05 Aug 2008 15:46:05 -0000 On Thu, 31 Jul 2008 01:32:29 +0900 Norikatsu Shigemura wrote: > > However, this feature is a bit undocumented yet, and it didn't work correctly > > for me. But you can always test it out. > I'm using zfsboot on my note PC, and not using UFS. I know many > problems about it:-). > 1. zpool configuration is too limited, only single and mirror > usable. If you want to zfsboot, you can't use RAIDZ, striping > and cache(zpool add ... cache ...):-(. I missed. zfsboot is disregarded zpool cache rather than supports it. > SEE ALSO: > http://lists.freebsd.org/pipermail/freebsd-fs/2008-July/004895.html > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/125878 I found some zfsboot issues, please apply following patches: 1. zfsboot2 (boot2) doesn't %d (printf), so change %d to %u. 2. chase new zpool versioning as SPA_VERSION. Obtained from: sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- sys/boot/zfs/zfsimpl.c.orig 2008-07-28 01:54:49.194419000 +0900 +++ sys/boot/zfs/zfsimpl.c 2008-08-05 23:48:12.035247220 +0900 @@ -656,8 +656,8 @@ return (EIO); } - if (val != ZFS_VERSION) { - printf("ZFS: unsupported ZFS version %d\n", (int) val); + if (val > SPA_VERSION) { + printf("ZFS: unsupported ZFS version %u (should be %u)\n", (int) val, (int) SPA_VERSION); return (EIO); } --- sys/cddl/boot/zfs/zfsimpl.h.orig 2008-07-28 01:54:49.296418000 +0900 +++ sys/cddl/boot/zfs/zfsimpl.h 2008-08-06 00:07:41.871760182 +0900 @@ -448,19 +448,24 @@ /* * On-disk version number. */ -#define ZFS_VERSION_1 1ULL -#define ZFS_VERSION_2 2ULL -#define ZFS_VERSION_3 3ULL -#define ZFS_VERSION_4 4ULL -#define ZFS_VERSION_5 5ULL -#define ZFS_VERSION_6 6ULL +#define SPA_VERSION_1 1ULL +#define SPA_VERSION_2 2ULL +#define SPA_VERSION_3 3ULL +#define SPA_VERSION_4 4ULL +#define SPA_VERSION_5 5ULL +#define SPA_VERSION_6 6ULL +#define SPA_VERSION_7 7ULL +#define SPA_VERSION_8 8ULL +#define SPA_VERSION_9 9ULL +#define SPA_VERSION_10 10ULL +#define SPA_VERSION_11 11ULL /* * When bumping up ZFS_VERSION, make sure GRUB ZFS understand the on-disk * format change. Go to usr/src/grub/grub-0.95/stage2/{zfs-include/, fsys_zfs*}, * and do the appropriate changes. */ -#define ZFS_VERSION ZFS_VERSION_6 -#define ZFS_VERSION_STRING "6" +#define SPA_VERSION SPA_VERSION_11 +#define SPA_VERSION_STRING "11" /* * Symbolic names for the changes that caused a ZFS_VERSION switch. @@ -473,16 +478,26 @@ * last synced uberblock. Checking the in-flight version can * be dangerous in some cases. */ -#define ZFS_VERSION_INITIAL ZFS_VERSION_1 -#define ZFS_VERSION_DITTO_BLOCKS ZFS_VERSION_2 -#define ZFS_VERSION_SPARES ZFS_VERSION_3 -#define ZFS_VERSION_RAID6 ZFS_VERSION_3 -#define ZFS_VERSION_BPLIST_ACCOUNT ZFS_VERSION_3 -#define ZFS_VERSION_RAIDZ_DEFLATE ZFS_VERSION_3 -#define ZFS_VERSION_DNODE_BYTES ZFS_VERSION_3 -#define ZFS_VERSION_ZPOOL_HISTORY ZFS_VERSION_4 -#define ZFS_VERSION_GZIP_COMPRESSION ZFS_VERSION_5 -#define ZFS_VERSION_BOOTFS ZFS_VERSION_6 +#define SPA_VERSION_INITIAL SPA_VERSION_1 +#define SPA_VERSION_DITTO_BLOCKS SPA_VERSION_2 +#define SPA_VERSION_SPARES SPA_VERSION_3 +#define SPA_VERSION_RAID6 SPA_VERSION_3 +#define SPA_VERSION_BPLIST_ACCOUNT SPA_VERSION_3 +#define SPA_VERSION_RAIDZ_DEFLATE SPA_VERSION_3 +#define SPA_VERSION_DNODE_BYTES SPA_VERSION_3 +#define SPA_VERSION_ZPOOL_HISTORY SPA_VERSION_4 +#define SPA_VERSION_GZIP_COMPRESSION SPA_VERSION_5 +#define SPA_VERSION_BOOTFS SPA_VERSION_6 +#define SPA_VERSION_SLOGS SPA_VERSION_7 +#define SPA_VERSION_DELEGATED_PERMS SPA_VERSION_8 +#define SPA_VERSION_FUID SPA_VERSION_9 +#define SPA_VERSION_REFRESERVATION SPA_VERSION_9 +#define SPA_VERSION_REFQUOTA SPA_VERSION_9 +#define SPA_VERSION_UNIQUE_ACCURATE SPA_VERSION_9 +#define SPA_VERSION_L2CACHE SPA_VERSION_10 +#define SPA_VERSION_NEXT_CLONES SPA_VERSION_11 +#define SPA_VERSION_ORIGIN SPA_VERSION_11 +#define SPA_VERSION_DSL_SCRUB SPA_VERSION_11 /* * The following are configuration names used in the nvlist describing a pool's --- sys/cddl/boot/zfs/zfssubr.c.orig 2008-07-28 01:54:49.297420000 +0900 +++ sys/cddl/boot/zfs/zfssubr.c 2008-08-06 00:19:29.665026084 +0900 @@ -162,7 +162,7 @@ /* ASSERT((uint_t)cpfunc < ZIO_COMPRESS_FUNCTIONS); */ if (!ci->ci_decompress) { - printf("ZFS: unsupported compression algorithm %d\n", cpfunc); + printf("ZFS: unsupported compression algorithm %u\n", cpfunc); return (EIO); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -