diff options
author | mav <mav@FreeBSD.org> | 2016-03-08 17:32:24 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-03-08 17:32:24 +0000 |
commit | c9c7a2d25d84f05d30feaaf446881ca5b7c51e0d (patch) | |
tree | e258556f3582fa56cc4d81986b9d3c3a6fa0347a | |
parent | dca4cd64ea6b1e8db72455a81d48e7d323aead09 (diff) | |
download | FreeBSD-src-c9c7a2d25d84f05d30feaaf446881ca5b7c51e0d.zip FreeBSD-src-c9c7a2d25d84f05d30feaaf446881ca5b7c51e0d.tar.gz |
MFV r296511: 6537 Panic on zpool scrub with DEBUG kernel
Reviewed by: Steve Gonczi <gonczi@comcast.net>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Gary Mills <gary_mills@fastmail.fm>
illumos/illumos-gate@8c04a1fa3f7d569d48fe9b5342d0bd4c533179b9
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c index 4023985..3c3c4c0 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2015 by Delphix. All rights reserved. + * Copyright 2016 Gary Mills */ #include <sys/dsl_scan.h> @@ -1545,7 +1546,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) } if (err != 0) return; - if (!scn->scn_async_destroying && zfs_free_leak_on_eio && + if (dp->dp_free_dir != NULL && !scn->scn_async_destroying && + zfs_free_leak_on_eio && (dsl_dir_phys(dp->dp_free_dir)->dd_used_bytes != 0 || dsl_dir_phys(dp->dp_free_dir)->dd_compressed_bytes != 0 || dsl_dir_phys(dp->dp_free_dir)->dd_uncompressed_bytes != 0)) { @@ -1571,7 +1573,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) -dsl_dir_phys(dp->dp_free_dir)->dd_compressed_bytes, -dsl_dir_phys(dp->dp_free_dir)->dd_uncompressed_bytes, tx); } - if (!scn->scn_async_destroying) { + if (dp->dp_free_dir != NULL && !scn->scn_async_destroying) { /* finished; verify that space accounting went to zero */ ASSERT0(dsl_dir_phys(dp->dp_free_dir)->dd_used_bytes); ASSERT0(dsl_dir_phys(dp->dp_free_dir)->dd_compressed_bytes); |