From owner-svn-src-all@freebsd.org Tue Jan 26 12:50:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C536A6E6DB; Tue, 26 Jan 2016 12:50:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B411A41; Tue, 26 Jan 2016 12:50:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0QCoEio015423; Tue, 26 Jan 2016 12:50:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0QCoEqw015422; Tue, 26 Jan 2016 12:50:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201601261250.u0QCoEqw015422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 26 Jan 2016 12:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294805 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2016 12:50:15 -0000 Author: mav Date: Tue Jan 26 12:50:14 2016 New Revision: 294805 URL: https://svnweb.freebsd.org/changeset/base/294805 Log: MFV r294804: 6386 Fix function call with uninitialized value in vdev_inuse Reviewed by: Brian Behlendorf Reviewed by: Matthew Ahrens Reviewed by: Dan Kimmel Approved by: Robert Mustacchi Author: Richard Yao illumos/illumos-gate@5bdd995ddb777f538bfbcc5e2d5ff1bed07ae56e Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Tue Jan 26 12:49:31 2016 (r294804) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Tue Jan 26 12:50:14 2016 (r294805) @@ -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;