From fe467e06fd700707501e7e53cf0292149e308684 Mon Sep 17 00:00:00 2001 From: Dan Vatca Date: Sat, 9 Jan 2016 18:42:21 +0100 Subject: [PATCH] Illumos 6358 - A faulted pool with only unavailable vdevs 6358 A faulted pool with only unavailable vdevs triggers assertion failure in libzfs Reviewed by: Matthew Ahrens Reviewed by: Andrew Stormont Reviewed by: Serban Maduta Approved by: Dan McDonald References: https://illumos.org/issues/6358 https://github.com/illumos/illumos-gate/commit/b289d04 Ported-by: kernelOfTruth kerneloftruth@gmail.com Signed-off-by: Brian Behlendorf --- lib/libzfs/libzfs_config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libzfs/libzfs_config.c b/lib/libzfs/libzfs_config.c index 4175635337..9857ed9850 100644 --- a/lib/libzfs/libzfs_config.c +++ b/lib/libzfs/libzfs_config.c @@ -26,6 +26,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2015 by Syneto S.R.L. All rights reserved. */ /* @@ -246,8 +247,9 @@ zpool_get_features(zpool_handle_t *zhp) config = zpool_get_config(zhp, NULL); } - verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_FEATURE_STATS, - &features) == 0); + if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_FEATURE_STATS, + &features) != 0) + return (NULL); return (features); }