Re: ZFS patches.

From: John Baldwin <jhb_at_freebsd.org>
Date: Tue, 5 Aug 2008 13:28:17 -0400
On Tuesday 05 August 2008 11:45:57 am Norikatsu Shigemura wrote:
> On Thu, 31 Jul 2008 01:32:29 +0900
> Norikatsu Shigemura <nork_at_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
> _at__at_ -656,8 +656,8 _at__at_
>  		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
> _at__at_ -448,19 +448,24 _at__at_
>  /*
>   * 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

FYI, style(9) prefers '#define<tab>' to '#define<space>'.  Keeping with the 
existing style would likely shorten the diffs.

-- 
John Baldwin
Received on Tue Aug 05 2008 - 16:58:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:33 UTC