Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Mar 2016 23:54:59 +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-10@freebsd.org
Subject:   svn commit: r297097 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201603202354.u2KNsxqr028253@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sun Mar 20 23:54:59 2016
New Revision: 297097
URL: https://svnweb.freebsd.org/changeset/base/297097

Log:
  MFC r294805: MFV r294804:
  6386 Fix function call with uninitialized value in vdev_inuse
  
  Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
  Reviewed by: Matthew Ahrens <mahrens@delphix.com>
  Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
  Approved by: Robert Mustacchi <rm@joyent.com>
  Author: Richard Yao <ryao@gentoo.org>
  
  illumos/illumos-gate@5bdd995ddb777f538bfbcc5e2d5ff1bed07ae56e

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c	Sun Mar 20 23:54:05 2016	(r297096)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c	Sun Mar 20 23:54:59 2016	(r297097)
@@ -602,7 +602,8 @@ vdev_inuse(vdev_t *vd, uint64_t crtxg, v
 	 * read-only.  Instead we look to see if the pools is marked
 	 * read-only in the namespace and set the state to active.
 	 */
-	if ((spa = spa_by_guid(pool_guid, device_guid)) != NULL &&
+	if (state != POOL_STATE_SPARE && state != POOL_STATE_L2CACHE &&
+	    (spa = spa_by_guid(pool_guid, device_guid)) != NULL &&
 	    spa_mode(spa) == FREAD)
 		state = POOL_STATE_ACTIVE;
 



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