diff options
author | Alex Reece <[email protected]> | 2014-09-04 16:08:28 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-09-05 09:06:27 -0700 |
commit | f38dfec3fd3757fd02d8c7bb46fecdfc427678ce (patch) | |
tree | 215a8d5b5d5e3e9ed32fd23e4d4303bc40f30b6e /module/zfs/vdev.c | |
parent | 2078f21015b1f33329849997c9f918e5196806bd (diff) |
Illumos 5049 - panic when removing log device
Reviewed by: George Wilson <[email protected]>
Reviewed by: Mattew Ahrens <[email protected]>
Reviewed by: Paul Dagnelie <[email protected]>
Reviewed by: Dan Kimmel <[email protected]>
Reviewed by: Saso Kiselkov <[email protected]>
Approved by: Rich Lowe <[email protected]>
References:
https://www.illumos.org/issues/5049
https://github.com/illumos/illumos-gate/commit/2986efa
Ported-by: Brian Behlendorf <[email protected]>
Closes #2636
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r-- | module/zfs/vdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 0303edada..7c689b3c8 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -2655,8 +2655,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 |