svn commit: r290713 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Steven Hartland
smh at FreeBSD.org
Thu Nov 12 10:20:38 UTC 2015
Author: smh
Date: Thu Nov 12 10:20:36 2015
New Revision: 290713
URL: https://svnweb.freebsd.org/changeset/base/290713
Log:
MFC r290401 & r290466
Provide information about bad DVA
Sponsored by: Multiplay
Modified:
stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Nov 12 10:16:35 2015 (r290712)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Nov 12 10:20:36 2015 (r290713)
@@ -1807,7 +1807,13 @@ dva_get_dsize_sync(spa_t *spa, const 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;
}
More information about the svn-src-stable-10
mailing list