From 2986efa8094ce00f75df27fb74a184c65c38614a Mon Sep 17 00:00:00 2001 From: Alex Reece Date: Mon, 4 Aug 2014 05:33:24 -0800 Subject: [PATCH] 5049 panic when removing log device Reviewed by: George Wilson Reviewed by: Mattew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Dan Kimmel Reviewed by: Saso Kiselkov Approved by: Rich Lowe --- usr/src/uts/common/fs/zfs/vdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/src/uts/common/fs/zfs/vdev.c b/usr/src/uts/common/fs/zfs/vdev.c index e1a0fbfe4c59..28ef0414a280 100644 --- a/usr/src/uts/common/fs/zfs/vdev.c +++ b/usr/src/uts/common/fs/zfs/vdev.c @@ -2613,8 +2613,9 @@ vdev_get_stats(vdev_t *vd, vdev_stat_t *vs) if (vd->vdev_ops->vdev_op_leaf) vs->vs_rsize += VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE; vs->vs_esize = vd->vdev_max_asize - vd->vdev_asize; - if (vd->vdev_aux == NULL && vd == vd->vdev_top) + if (vd->vdev_aux == NULL && vd == vd->vdev_top && !vd->vdev_ishole) { vs->vs_fragmentation = vd->vdev_mg->mg_fragmentation; + } /* * If we're getting stats on the root vdev, aggregate the I/O counts