diff options
author | Gary Mills <[email protected]> | 2016-02-02 16:23:21 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-02-05 11:29:32 -0800 |
commit | 7c9abfa7ab0bc88e059800c6a5f8d2c2ebb62588 (patch) | |
tree | 224914b9bec79f0740467c0596e32ea8aef9e2fe | |
parent | a4d179efa98f7fd3a54d2cf056b1ab3d86f14d50 (diff) |
Illumos 6537 - Panic on zpool scrub with DEBUG kernel
6537 Panic on zpool scrub with DEBUG kernel
Reviewed by: Steve Gonczi <[email protected]>
Reviewed by: Dan McDonald <[email protected]>
Reviewed by: Igor Kozhukhov <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Approved by: Matthew Ahrens <[email protected]>
References:
https://www.illumos.org/issues/6537
https://github.com/illumos/illumos-gate/commit/8c04a1f
Ported-by: Brian Behlendorf <[email protected]>
-rw-r--r-- | module/zfs/dsl_scan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c index 166d0c1eb..8a5fac25f 100644 --- a/module/zfs/dsl_scan.c +++ b/module/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> @@ -1626,7 +1627,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)) { @@ -1652,7 +1654,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); |