Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2017 09:56:08 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r321680 - stable/11/sys/boot/zfs
Message-ID:  <201707290956.v6T9u85G086185@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Jul 29 09:56:07 2017
New Revision: 321680
URL: https://svnweb.freebsd.org/changeset/base/321680

Log:
  MFC r307865 (by tsoome): 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.
  
  Differential Revision:  https://reviews.freebsd.org/D8331
  
  PR:		221084

Modified:
  stable/11/sys/boot/zfs/zfsimpl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/boot/zfs/zfsimpl.c
==============================================================================
--- stable/11/sys/boot/zfs/zfsimpl.c	Sat Jul 29 09:22:48 2017	(r321679)
+++ stable/11/sys/boot/zfs/zfsimpl.c	Sat Jul 29 09:56:07 2017	(r321680)
@@ -2046,8 +2046,13 @@ check_mos_features(const spa_t *spa)
 	if ((rc = objset_get_dnode(spa, &spa->spa_mos, DMU_OT_OBJECT_DIRECTORY,
 	    &dir)) != 0)
 		return (rc);
-	if ((rc = zap_lookup(spa, &dir, DMU_POOL_FEATURES_FOR_READ, &objnum)) != 0)
-		return (rc);
+	if ((rc = zap_lookup(spa, &dir, DMU_POOL_FEATURES_FOR_READ, &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?201707290956.v6T9u85G086185>