svn commit: r249068 - stable/8/cddl/contrib/opensolaris/cmd/zpool

Xin LI delphij at FreeBSD.org
Wed Apr 3 21:15:22 UTC 2013


Author: delphij
Date: Wed Apr  3 21:15:21 2013
New Revision: 249068
URL: http://svnweb.freebsd.org/changeset/base/249068

Log:
  The current ZFS version in 8-STABLE supports feature flags, which
  enables many new features but makes it impossible to import pools
  created on earlier released FreeBSD 9.x releases, including 9.0
  and 9.1-RELEASE, where the feature flags are not yet supported
  because they predates the merge (r243674), and 9.2-RELEASE will
  not be released before 8.4-RELEASE.
  
  To avoid surprises when users "upgrade" to 9.1-RELEASE, limit the
  creation version to 28 by default on stable/8.  The user will still
  be able to upgrade the pool by using "zpool upgrade" or at create
  time by explicitly specifying "zpool create -o version=5000".
  
  This is a direct commit to stable/8 because it's not applicable to
  -HEAD, and can be reverted once 9.2-RELEASE is released.
  
  Requested by:	re (jpaetzel, hrs)
  Reviewed by:	mm

Modified:
  stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c

Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
==============================================================================
--- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Wed Apr  3 20:52:17 2013	(r249067)
+++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Wed Apr  3 21:15:21 2013	(r249068)
@@ -856,6 +856,19 @@ zpool_do_create(int argc, char **argv)
 		}
 	}
 
+#ifdef __FreeBSD__
+	/* Compatiblity with FreeBSD 9.0 and 9.1: Use version 28 if unspecified */
+	if (nvlist_lookup_string(props,
+	    zpool_prop_to_name(ZPOOL_PROP_VERSION),
+	    &propval) != 0) {
+		if (add_prop_list(zpool_prop_to_name(
+		    ZPOOL_PROP_VERSION), "28", &props, B_TRUE))
+			goto errout;
+		enable_all_pool_feat = B_FALSE;
+	} else if (enable_all_pool_feat)
+		nvlist_remove_all(props, zpool_prop_to_name(ZPOOL_PROP_VERSION));
+#endif /* __FreeBSD__ */
+
 	argc -= optind;
 	argv += optind;
 


More information about the svn-src-stable-8 mailing list