]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Illumos 6358 - A faulted pool with only unavailable vdevs
authorDan Vatca <dan.vatca@gmail.com>
Sat, 9 Jan 2016 17:42:21 +0000 (18:42 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 12 Jan 2016 19:15:26 +0000 (11:15 -0800)
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>

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 <behlendorf1@llnl.gov>
lib/libzfs/libzfs_config.c

index 41756353378d88232c5b605e6d05e0b198c40ba5..9857ed9850ffb03d73db1b31846ca62ba4777ba9 100644 (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);
 }