Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Oct 2016 16:28:54 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307865 - head/sys/boot/zfs
Message-ID:  <201610241628.u9OGSs52005532@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Mon Oct 24 16:28:54 2016
New Revision: 307865
URL: https://svnweb.freebsd.org/changeset/base/307865

Log:
  loader should boot pre-feature flags pools.
  
  The feature flags chek is missing the corner case where we have valid pool
  version, but feature flags are not enabled - as for example plain v28 pool.
  
  This update does fix the boot support for such pools.
  
  Reviewed by:	avg, allanjude
  Approved by:	allanjude (mentor)
  Differential Revision:	https://reviews.freebsd.org/D8331

Modified:
  head/sys/boot/zfs/zfsimpl.c

Modified: head/sys/boot/zfs/zfsimpl.c
==============================================================================
--- head/sys/boot/zfs/zfsimpl.c	Mon Oct 24 14:56:13 2016	(r307864)
+++ head/sys/boot/zfs/zfsimpl.c	Mon Oct 24 16:28:54 2016	(r307865)
@@ -2122,8 +2122,13 @@ check_mos_features(const spa_t *spa)
 	    &dir)) != 0)
 		return (rc);
 	if ((rc = zap_lookup(spa, &dir, DMU_POOL_FEATURES_FOR_READ,
-	    sizeof (objnum), 1, &objnum)) != 0)
-		return (rc);
+	    sizeof (objnum), 1, &objnum)) != 0) {
+		/*
+		 * It is older pool without features. As we have already
+		 * tested the label, just return without raising the error.
+		 */
+		return (0);
+	}
 
 	if ((rc = objset_get_dnode(spa, &spa->spa_mos, objnum, &dir)) != 0)
 		return (rc);



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