aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Vatca <[email protected]>2016-01-09 18:42:21 +0100
committerBrian Behlendorf <[email protected]>2016-01-12 11:15:26 -0800
commitfe467e06fd700707501e7e53cf0292149e308684 (patch)
treed08aaeb2b738fd9a84301aaf03051762f446f58d
parentadfe9d932bb5a4d367f7abe2e3b33fc0363dc815 (diff)
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 <[email protected]> Reviewed by: Andrew Stormont <[email protected]> Reviewed by: Serban Maduta <[email protected]> Approved by: Dan McDonald <[email protected]> References: https://illumos.org/issues/6358 https://github.com/illumos/illumos-gate/commit/b289d04 Ported-by: kernelOfTruth [email protected] Signed-off-by: Brian Behlendorf <[email protected]>
-rw-r--r--lib/libzfs/libzfs_config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_config.c b/lib/libzfs/libzfs_config.c
index 417563533..9857ed985 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);
}