Mercurial > illumos > illumos-gate
changeset 10666:48f9827bb5cf
6886074 zfs shouldn't add zero length arrays since nvlists apparently can't handle them
author | George Wilson <George.Wilson@Sun.COM> |
---|---|
date | Mon, 28 Sep 2009 07:34:34 -0700 |
parents | 026530b2b10e |
children | bc413e63c72c |
files | usr/src/uts/common/fs/zfs/vdev_label.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/vdev_label.c Mon Sep 28 08:36:10 2009 -0400 +++ b/usr/src/uts/common/fs/zfs/vdev_label.c Mon Sep 28 07:34:34 2009 -0700 @@ -366,8 +366,11 @@ array[idx++] = c; } - VERIFY(nvlist_add_uint64_array(config, ZPOOL_CONFIG_HOLE_ARRAY, - array, idx++) == 0); + if (idx) { + VERIFY(nvlist_add_uint64_array(config, ZPOOL_CONFIG_HOLE_ARRAY, + array, idx) == 0); + } + VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_VDEV_CHILDREN, rvd->vdev_children) == 0);