changeset 14056:812b3d1ca0a0

3818 zpool status -x should report pools with removed l2arc devices Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com> Reviewed by: George Wilson <gwilson@zfsmail.com> Approved by: Christopher Siden <christopher.siden@delphix.com>
author Steven Hartland <smh@freebsd.org>
date Tue, 18 Jun 2013 22:36:40 -0800
parents 031a1c9c05cb
children b99338e2b7ed
files usr/src/lib/libzfs/common/libzfs_status.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/libzfs/common/libzfs_status.c	Fri Jun 14 10:16:47 2013 +0400
+++ b/usr/src/lib/libzfs/common/libzfs_status.c	Tue Jun 18 22:36:40 2013 -0800
@@ -22,6 +22,7 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2013 Steven Hartland. All rights reserved.
  */
 
 /*
@@ -150,6 +151,16 @@
 			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);
 }