diff options
author | smh <smh@FreeBSD.org> | 2015-11-12 10:20:36 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2015-11-12 10:20:36 +0000 |
commit | 5b5d335fed990b7c6249d5063886fa5990382ffa (patch) | |
tree | 6545bf2333bb5c6f5abbc4ce9db058cccbc933dd | |
parent | 04f48bd1f33813c00dd2cd453619378668646f01 (diff) | |
download | FreeBSD-src-5b5d335fed990b7c6249d5063886fa5990382ffa.zip FreeBSD-src-5b5d335fed990b7c6249d5063886fa5990382ffa.tar.gz |
MFC r290401 & r290466
Provide information about bad DVA
Sponsored by: Multiplay
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c index 5439be3..45603e5 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c @@ -1807,7 +1807,13 @@ dva_get_dsize_sync(spa_t *spa, const dva_t *dva) ASSERT(spa_config_held(spa, SCL_ALL, RW_READER) != 0); if (asize != 0 && spa->spa_deflate) { - vdev_t *vd = vdev_lookup_top(spa, DVA_GET_VDEV(dva)); + uint64_t vdev = DVA_GET_VDEV(dva); + vdev_t *vd = vdev_lookup_top(spa, vdev); + if (vd == NULL) { + panic( + "dva_get_dsize_sync(): bad DVA %llu:%llu", + (u_longlong_t)vdev, (u_longlong_t)asize); + } dsize = (asize >> SPA_MINBLOCKSHIFT) * vd->vdev_deflate_ratio; } |