OpenZFS 7545 - zdb should disable reference tracking
Authored by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Steve Gonczi <steve.gonczi@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov> Porting Notes: Moved reference_tracking_enable and reference_history outside of ZFS_DEBUG. OpenZFS-issue: https://www.illumos.org/issues/7545 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/4dd77f9 Closes #5701
This commit is contained in:
parent
3d91261599
commit
d69a321e56
@ -84,10 +84,12 @@ zdb_ot_name(dmu_object_type_t type)
|
||||
}
|
||||
|
||||
#ifndef lint
|
||||
extern int reference_tracking_enable;
|
||||
extern int zfs_recover;
|
||||
extern uint64_t zfs_arc_max, zfs_arc_meta_limit;
|
||||
extern int zfs_vdev_async_read_max_active;
|
||||
#else
|
||||
int reference_tracking_enable;
|
||||
int zfs_recover;
|
||||
uint64_t zfs_arc_max, zfs_arc_meta_limit;
|
||||
int zfs_vdev_async_read_max_active;
|
||||
@ -3813,6 +3815,11 @@ main(int argc, char **argv)
|
||||
*/
|
||||
zfs_vdev_async_read_max_active = 10;
|
||||
|
||||
/*
|
||||
* Disable reference tracking for better performance.
|
||||
*/
|
||||
reference_tracking_enable = B_FALSE;
|
||||
|
||||
kernel_init(FREAD);
|
||||
if ((g_zfs = libzfs_init()) == NULL) {
|
||||
(void) fprintf(stderr, "%s", libzfs_error_init(errno));
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include <sys/zfs_context.h>
|
||||
#include <sys/refcount.h>
|
||||
|
||||
#ifdef ZFS_DEBUG
|
||||
|
||||
#ifdef _KERNEL
|
||||
int reference_tracking_enable = FALSE; /* runs out of memory too easily */
|
||||
#else
|
||||
@ -35,6 +33,7 @@ int reference_tracking_enable = TRUE;
|
||||
#endif
|
||||
int reference_history = 3; /* tunable */
|
||||
|
||||
#ifdef ZFS_DEBUG
|
||||
static kmem_cache_t *reference_cache;
|
||||
static kmem_cache_t *reference_history_cache;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user