Skip to content

Commit

Permalink
Add metaslab_debug option
Browse files Browse the repository at this point in the history
Enabling metaslab debugging will prevent space maps from being
automatically unloaded.  This can significantly increase the
memory footprint but being able to dynamically control this is
helpful for debugging and certain performance testing.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
  • Loading branch information
behlendorf committed Mar 18, 2013
1 parent f375757 commit 30b92c1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion module/zfs/metaslab.c
Expand Up @@ -58,7 +58,7 @@ int zfs_mg_alloc_failures;
/*
* Metaslab debugging: when set, keeps all space maps in core to verify frees.
*/
static int metaslab_debug = 0;
int metaslab_debug = 0;

/*
* Minimum size which forces the dynamic allocator to change
Expand Down Expand Up @@ -1746,3 +1746,8 @@ void metaslab_fastwrite_unmark(spa_t *spa, const blkptr_t *bp)

spa_config_exit(spa, SCL_VDEV, FTAG);
}

#if defined(_KERNEL) && defined(HAVE_SPL)
module_param(metaslab_debug, int, 0644);
MODULE_PARM_DESC(metaslab_debug, "keep space maps in core to verify frees");
#endif /* _KERNEL && HAVE_SPL */

0 comments on commit 30b92c1

Please sign in to comment.