MFV 295046: 6358 A faulted pool with only unavailable vdevs triggers

assertion failure in libzfs

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Serban Maduta <serban.maduta@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Dan Vatca <dan.vatca@gmail.com>

illumos/illumos-gate@b289d045e0
This commit is contained in:
Alexander Motin 2016-01-29 17:20:59 +00:00
commit 668e1ba140
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295047

View File

@ -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);
}