Skip to content

Commit

Permalink
3818 zpool status -x should report pools with removed l2arc devices
Browse files Browse the repository at this point in the history
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Reviewed by: George Wilson <gwilson@zfsmail.com>
Approved by: Christopher Siden <christopher.siden@delphix.com>
  • Loading branch information
Steven Hartland authored and Christopher Siden committed Jun 19, 2013
1 parent 693e4d8 commit 7f2416e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions usr/src/lib/libzfs/common/libzfs_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/

/*
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 7f2416e

Please sign in to comment.