Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Aug 2008 00:45:57 +0900
From:      Norikatsu Shigemura <nork@FreeBSD.org>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        Randy Bush <randy@psg.com>, Ulf Lilleengen <lulf@FreeBSD.org>, Jeremy Chadwick <koitsu@FreeBSD.org>, Stefan, Norikatsu Shigemura <nork@FreeBSD.org>, Lambrev <stefan.lambrev@moneybookers.com>, freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org, OutBackdingo <outbackdingo@gmail.com>
Subject:   Re: ZFS patches.
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 31 Jul 2008 01:32:29 +0900
Norikatsu Shigemura <nork@FreeBSD.org> 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);
 	}
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080806004557.6e538e5c.nork>