From owner-svn-src-head@FreeBSD.ORG Tue Jan 15 23:34:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5F47A4A6; Tue, 15 Jan 2013 23:34:25 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 46C352A5; Tue, 15 Jan 2013 23:34:25 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0FNYPWf086432; Tue, 15 Jan 2013 23:34:25 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0FNYPtf086431; Tue, 15 Jan 2013 23:34:25 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201301152334.r0FNYPtf086431@svn.freebsd.org> From: Steven Hartland Date: Tue, 15 Jan 2013 23:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245479 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2013 23:34:25 -0000 Author: smh Date: Tue Jan 15 23:34:24 2013 New Revision: 245479 URL: http://svnweb.freebsd.org/changeset/base/245479 Log: Reports pools which have a removed l2cache disk under -x as this is what happens when a cache device is dropped for any reason. Reviewed by: pjd Approved by: pjd (mentor) MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c Tue Jan 15 22:11:28 2013 (r245478) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c Tue Jan 15 23:34:24 2013 (r245479) @@ -150,6 +150,16 @@ find_vdev_problem(nvlist_t *vdev, int (* return (B_TRUE); } + /* + * Check any L2 cache devs + */ + if (nvlist_lookup_nvlist_array(vdev, ZPOOL_CONFIG_L2CACHE, &child, + &children) == 0) { + for (c = 0; c < children; c++) + if (find_vdev_problem(child[c], func)) + return (B_TRUE); + } + return (B_FALSE); }