diff options
author | smh <smh@FreeBSD.org> | 2013-01-15 23:34:24 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2013-01-15 23:34:24 +0000 |
commit | cfd489a4ed1aa114d31ae863ee02e3d59afb9a14 (patch) | |
tree | a3686c9212f12a3c4e445bb3838aba2d1d95db1f | |
parent | ecb37fcbc869e92d98b0cfdebfcf435336d266c3 (diff) | |
download | FreeBSD-src-cfd489a4ed1aa114d31ae863ee02e3d59afb9a14.zip FreeBSD-src-cfd489a4ed1aa114d31ae863ee02e3d59afb9a14.tar.gz |
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
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c index 560bacd..6af5f77 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c @@ -150,6 +150,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); } |