diff options
author | Don Brady <[email protected]> | 2021-03-16 15:56:17 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-16 14:56:17 -0700 |
commit | dd0b5c8559329a042e55159a5d83440481b06416 (patch) | |
tree | 79734615e42c68195a97ee9b1b479dc3a560ba43 /module/zfs | |
parent | 9305ff2edf7ff67cdd2cc3d38884fa4f5de6dadd (diff) |
Reference_tracking_enable should be a module param
To make use of zfs_refcount_held tunable it should be a module
parameter in open-zfs. Also, since the macros will auto-generate OS
specific tunables, removed the existing zfs_refcount_held reference
in module/os/freebsd/zfs/sysctl_os.c.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Allan Jude <[email protected]>
Signed-off-by: Don Brady <[email protected]>
Closes #11753
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/refcount.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/module/zfs/refcount.c b/module/zfs/refcount.c index 39476261e..a3877b8d1 100644 --- a/module/zfs/refcount.c +++ b/module/zfs/refcount.c @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2012, 2021 by Delphix. All rights reserved. */ #include <sys/zfs_context.h> @@ -324,4 +324,12 @@ zfs_refcount_not_held(zfs_refcount_t *rc, const void *holder) mutex_exit(&rc->rc_mtx); return (B_TRUE); } + +/* BEGIN CSTYLED */ +ZFS_MODULE_PARAM(zfs, ,reference_tracking_enable, INT, ZMOD_RW, + "Track reference holders to refcount_t objects"); + +ZFS_MODULE_PARAM(zfs, ,reference_history, INT, ZMOD_RW, + "Maximum reference holders being tracked"); +/* END CSTYLED */ #endif /* ZFS_DEBUG */ |