diff options
author | Brian Behlendorf <[email protected]> | 2016-05-06 18:14:03 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-05-06 18:14:03 -0700 |
commit | 33cf67cd9ab2edef003ad4c64d12f5a2372c8938 (patch) | |
tree | 778a92e85d7eeca3f304239e1ba3e21bfa938371 /module/zfs/spa.c | |
parent | d5167616bbe090d5050b4a6a4c26662c88230e14 (diff) |
Wrap vdev_count_verify_zaps() with ZFS_DEBUG
Commit e0ab3ab introduced two blocks of code which are only needed
when debugging is enabled. These blocks should be wrapped with
ZFS_DEBUG for clarity and to prevent unused variable warnings in
a production build.
Signed-off-by: Don Brady <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4515
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r-- | module/zfs/spa.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c index e24ba6f47..9246495ee 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -2238,6 +2238,7 @@ spa_load(spa_t *spa, spa_load_state_t state, spa_import_type_t type, return (error); } +#ifdef ZFS_DEBUG /* * Count the number of per-vdev ZAPs associated with all of the vdevs in the * vdev tree rooted in the given vd, and ensure that each ZAP is present in the @@ -2267,6 +2268,7 @@ vdev_count_verify_zaps(vdev_t *vd) return (total); } +#endif /* * Load an existing storage pool, using the pool's builtin spa_config as a @@ -6714,6 +6716,7 @@ spa_sync(spa_t *spa, uint64_t txg) } while (dmu_objset_is_dirty(mos, txg)); +#ifdef ZFS_DEBUG if (!list_is_empty(&spa->spa_config_dirty_list)) { /* * Make sure that the number of ZAPs for all the vdevs matches @@ -6728,6 +6731,7 @@ spa_sync(spa_t *spa, uint64_t txg) ASSERT3U(vdev_count_verify_zaps(spa->spa_root_vdev), ==, all_vdev_zap_entry_count); } +#endif /* * Rewrite the vdev configuration (which includes the uberblock) |