From 34ffbed88c949bc4c8b52691e548db16a6e6816a Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Tue, 18 Jun 2013 22:36:40 -0800 Subject: Illumos #3818 3818 zpool status -x should report pools with removed l2arc devices Reviewed by: Saso Kiselkov Reviewed by: George Wilson Approved by: Christopher Siden References: https://www.illumos.org/issues/3818 illumos/illumos-gate@7f2416ef64fb43dab18d9b36c0da64bea37c0df3 Ported-by: Richard Yao Signed-off-by: Brian Behlendorf Issue #1775 --- lib/libzfs/libzfs_status.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/libzfs/libzfs_status.c') diff --git a/lib/libzfs/libzfs_status.c b/lib/libzfs/libzfs_status.c index e6e923090..0ef5f36d6 100644 --- a/lib/libzfs/libzfs_status.c +++ b/lib/libzfs/libzfs_status.c @@ -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 @@ find_vdev_problem(nvlist_t *vdev, int (*func)(uint64_t, uint64_t, uint64_t)) 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); } -- cgit v1.2.3