diff options
author | Steven Hartland <[email protected]> | 2013-06-18 22:36:40 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-11-04 11:18:14 -0800 |
commit | 34ffbed88c949bc4c8b52691e548db16a6e6816a (patch) | |
tree | c45f756ef9e23c282cfca81296e8f46d5a223bbf | |
parent | 95fd54a1c5b93bb2aa3e7dffc28c784b1e21a8bb (diff) |
Illumos #3818
3818 zpool status -x should report pools with removed l2arc devices
Reviewed by: Saso Kiselkov <[email protected]>
Reviewed by: George Wilson <[email protected]>
Approved by: Christopher Siden <[email protected]>
References:
https://www.illumos.org/issues/3818
illumos/illumos-gate@7f2416ef64fb43dab18d9b36c0da64bea37c0df3
Ported-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1775
-rw-r--r-- | lib/libzfs/libzfs_status.c | 11 |
1 files changed, 11 insertions, 0 deletions
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); } |