|
|
|
@@ -92,12 +92,13 @@ __FBSDID("$FreeBSD$");
|
|
|
|
|
#include <sys/dsl_pool.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* BEGIN CSTYLED */
|
|
|
|
|
SYSCTL_DECL(_vfs_zfs);
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, arc, CTLFLAG_RW, 0, "ZFS adaptive replacement cache");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, arc, CTLFLAG_RW, 0,
|
|
|
|
|
"ZFS adaptive replacement cache");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, condense, CTLFLAG_RW, 0, "ZFS condense");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dbuf, CTLFLAG_RW, 0, "ZFS disk buf cache");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dbuf_cache, CTLFLAG_RW, 0, "ZFS disk buf cache");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dbuf_cache, CTLFLAG_RW, 0,
|
|
|
|
|
"ZFS disk buf cache");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, deadman, CTLFLAG_RW, 0, "ZFS deadman");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dedup, CTLFLAG_RW, 0, "ZFS dedup");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, l2arc, CTLFLAG_RW, 0, "ZFS l2arc");
|
|
|
|
@@ -105,7 +106,8 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, livelist, CTLFLAG_RW, 0, "ZFS livelist");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, lua, CTLFLAG_RW, 0, "ZFS lua");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW, 0, "ZFS metaslab");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, mg, CTLFLAG_RW, 0, "ZFS metaslab group");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, multihost, CTLFLAG_RW, 0, "ZFS multihost protection");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, multihost, CTLFLAG_RW, 0,
|
|
|
|
|
"ZFS multihost protection");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, prefetch, CTLFLAG_RW, 0, "ZFS prefetch");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, reconstruct, CTLFLAG_RW, 0, "ZFS reconstruct");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, recv, CTLFLAG_RW, 0, "ZFS receive");
|
|
|
|
@@ -120,15 +122,15 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, zil, CTLFLAG_RW, 0, "ZFS ZIL");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs, OID_AUTO, zio, CTLFLAG_RW, 0, "ZFS ZIO");
|
|
|
|
|
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs_livelist, OID_AUTO, condense, CTLFLAG_RW, 0,
|
|
|
|
|
"ZFS livelist condense");
|
|
|
|
|
"ZFS livelist condense");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, cache, CTLFLAG_RW, 0, "ZFS VDEV Cache");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, file, CTLFLAG_RW, 0, "ZFS VDEV file");
|
|
|
|
|
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror, CTLFLAG_RD, 0,
|
|
|
|
|
"ZFS VDEV mirror");
|
|
|
|
|
"ZFS VDEV mirror");
|
|
|
|
|
|
|
|
|
|
SYSCTL_DECL(_vfs_zfs_version);
|
|
|
|
|
SYSCTL_CONST_STRING(_vfs_zfs_version, OID_AUTO, module, CTLFLAG_RD,
|
|
|
|
|
(ZFS_META_VERSION "-" ZFS_META_RELEASE), "OpenZFS module version");
|
|
|
|
|
(ZFS_META_VERSION "-" ZFS_META_RELEASE), "OpenZFS module version");
|
|
|
|
|
|
|
|
|
|
extern arc_state_t ARC_anon;
|
|
|
|
|
extern arc_state_t ARC_mru;
|
|
|
|
@@ -204,76 +206,73 @@ extern int l2arc_noprefetch; /* don't cache prefetch bufs */
|
|
|
|
|
extern int l2arc_feed_again; /* turbo warmup */
|
|
|
|
|
extern int l2arc_norw; /* no reads during writes */
|
|
|
|
|
|
|
|
|
|
/* BEGIN CSTYLED */
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW,
|
|
|
|
|
&l2arc_write_max, 0, "max write size (LEGACY)");
|
|
|
|
|
&l2arc_write_max, 0, "max write size (LEGACY)");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW,
|
|
|
|
|
&l2arc_write_boost, 0, "extra write during warmup (LEGACY)");
|
|
|
|
|
&l2arc_write_boost, 0, "extra write during warmup (LEGACY)");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW,
|
|
|
|
|
&l2arc_headroom, 0, "number of dev writes (LEGACY)");
|
|
|
|
|
&l2arc_headroom, 0, "number of dev writes (LEGACY)");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW,
|
|
|
|
|
&l2arc_feed_secs, 0, "interval seconds (LEGACY)");
|
|
|
|
|
&l2arc_feed_secs, 0, "interval seconds (LEGACY)");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW,
|
|
|
|
|
&l2arc_feed_min_ms, 0, "min interval milliseconds (LEGACY)");
|
|
|
|
|
&l2arc_feed_min_ms, 0, "min interval milliseconds (LEGACY)");
|
|
|
|
|
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RW,
|
|
|
|
|
&l2arc_noprefetch, 0, "don't cache prefetch bufs (LEGACY)");
|
|
|
|
|
&l2arc_noprefetch, 0, "don't cache prefetch bufs (LEGACY)");
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_feed_again, CTLFLAG_RW,
|
|
|
|
|
&l2arc_feed_again, 0, "turbo warmup (LEGACY)");
|
|
|
|
|
&l2arc_feed_again, 0, "turbo warmup (LEGACY)");
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RW,
|
|
|
|
|
&l2arc_norw, 0, "no reads during writes (LEGACY)");
|
|
|
|
|
#if 0
|
|
|
|
|
extern int zfs_compressed_arc_enabled;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, compressed_arc_enabled, CTLFLAG_RW,
|
|
|
|
|
&zfs_compressed_arc_enabled, 1, "compressed arc buffers (LEGACY)");
|
|
|
|
|
#endif
|
|
|
|
|
&l2arc_norw, 0, "no reads during writes (LEGACY)");
|
|
|
|
|
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD,
|
|
|
|
|
&ARC_anon.arcs_size.rc_count, 0, "size of anonymous state");
|
|
|
|
|
&ARC_anon.arcs_size.rc_count, 0, "size of anonymous state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_metadata_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_anon.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of anonymous state");
|
|
|
|
|
&ARC_anon.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of anonymous state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_data_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_anon.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of anonymous state");
|
|
|
|
|
&ARC_anon.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of anonymous state");
|
|
|
|
|
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD,
|
|
|
|
|
&ARC_mru.arcs_size.rc_count, 0, "size of mru state");
|
|
|
|
|
&ARC_mru.arcs_size.rc_count, 0, "size of mru state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_metadata_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_mru.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of metadata in mru state");
|
|
|
|
|
&ARC_mru.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of metadata in mru state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_data_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_mru.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of data in mru state");
|
|
|
|
|
&ARC_mru.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of data in mru state");
|
|
|
|
|
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_size, CTLFLAG_RD,
|
|
|
|
|
&ARC_mru_ghost.arcs_size.rc_count, 0, "size of mru ghost state");
|
|
|
|
|
&ARC_mru_ghost.arcs_size.rc_count, 0, "size of mru ghost state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_mru_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of metadata in mru ghost state");
|
|
|
|
|
&ARC_mru_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of metadata in mru ghost state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_mru_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of data in mru ghost state");
|
|
|
|
|
&ARC_mru_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of data in mru ghost state");
|
|
|
|
|
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_size, CTLFLAG_RD,
|
|
|
|
|
&ARC_mfu.arcs_size.rc_count, 0, "size of mfu state");
|
|
|
|
|
&ARC_mfu.arcs_size.rc_count, 0, "size of mfu state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_metadata_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_mfu.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of metadata in mfu state");
|
|
|
|
|
&ARC_mfu.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of metadata in mfu state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_data_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_mfu.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of data in mfu state");
|
|
|
|
|
&ARC_mfu.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of data in mfu state");
|
|
|
|
|
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_size, CTLFLAG_RD,
|
|
|
|
|
&ARC_mfu_ghost.arcs_size.rc_count, 0, "size of mfu ghost state");
|
|
|
|
|
&ARC_mfu_ghost.arcs_size.rc_count, 0, "size of mfu ghost state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of metadata in mfu ghost state");
|
|
|
|
|
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
|
|
|
|
"size of metadata in mfu ghost state");
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_esize, CTLFLAG_RD,
|
|
|
|
|
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of data in mfu ghost state");
|
|
|
|
|
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
|
|
|
|
"size of data in mfu ghost state");
|
|
|
|
|
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD,
|
|
|
|
|
&ARC_l2c_only.arcs_size.rc_count, 0, "size of mru state");
|
|
|
|
|
&ARC_l2c_only.arcs_size.rc_count, 0, "size of mru state");
|
|
|
|
|
/* END CSTYLED */
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS)
|
|
|
|
@@ -285,7 +284,7 @@ sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS)
|
|
|
|
|
if (err != 0 || req->newptr == NULL)
|
|
|
|
|
return (err);
|
|
|
|
|
|
|
|
|
|
if (val < 0 || val >= arc_shrink_shift)
|
|
|
|
|
if (val < 0 || val >= arc_shrink_shift)
|
|
|
|
|
return (EINVAL);
|
|
|
|
|
|
|
|
|
|
arc_no_grow_shift = val;
|
|
|
|
@@ -295,7 +294,7 @@ sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS)
|
|
|
|
|
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_no_grow_shift,
|
|
|
|
|
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, NULL, sizeof (int),
|
|
|
|
|
sysctl_vfs_zfs_arc_no_grow_shift, "I",
|
|
|
|
|
"log2(fraction of ARC which must be free to allow growing)");
|
|
|
|
|
"log2(fraction of ARC which must be free to allow growing)");
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
param_set_arc_long(SYSCTL_HANDLER_ARGS)
|
|
|
|
@@ -325,14 +324,16 @@ param_set_arc_int(SYSCTL_HANDLER_ARGS)
|
|
|
|
|
return (0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* BEGIN CSTYLED */
|
|
|
|
|
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_min,
|
|
|
|
|
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
|
|
|
|
&zfs_arc_min, sizeof (zfs_arc_min), param_set_arc_min, "LU",
|
|
|
|
|
"min arc size (LEGACY)");
|
|
|
|
|
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
|
|
|
|
&zfs_arc_min, sizeof (zfs_arc_min), param_set_arc_min, "LU",
|
|
|
|
|
"min arc size (LEGACY)");
|
|
|
|
|
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_max,
|
|
|
|
|
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
|
|
|
|
&zfs_arc_max, sizeof (zfs_arc_max), param_set_arc_max, "LU",
|
|
|
|
|
"max arc size (LEGACY)");
|
|
|
|
|
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
|
|
|
|
&zfs_arc_max, sizeof (zfs_arc_max), param_set_arc_max, "LU",
|
|
|
|
|
"max arc size (LEGACY)");
|
|
|
|
|
/* END CSTYLED */
|
|
|
|
|
|
|
|
|
|
/* dbuf.c */
|
|
|
|
|
|
|
|
|
@@ -345,30 +346,33 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, zfetch, CTLFLAG_RW, 0, "ZFS ZFETCH (LEGACY)");
|
|
|
|
|
/* max bytes to prefetch per stream (default 8MB) */
|
|
|
|
|
extern uint32_t zfetch_max_distance;
|
|
|
|
|
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_distance, CTLFLAG_RWTUN,
|
|
|
|
|
&zfetch_max_distance, 0, "Max bytes to prefetch per stream (LEGACY)");
|
|
|
|
|
&zfetch_max_distance, 0, "Max bytes to prefetch per stream (LEGACY)");
|
|
|
|
|
|
|
|
|
|
/* max bytes to prefetch indirects for per stream (default 64MB) */
|
|
|
|
|
extern uint32_t zfetch_max_idistance;
|
|
|
|
|
/* BEGIN CSTYLED */
|
|
|
|
|
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_idistance, CTLFLAG_RWTUN,
|
|
|
|
|
&zfetch_max_idistance, 0,
|
|
|
|
|
"Max bytes to prefetch indirects for per stream (LEGACY)");
|
|
|
|
|
&zfetch_max_idistance, 0,
|
|
|
|
|
"Max bytes to prefetch indirects for per stream (LEGACY)");
|
|
|
|
|
/* END CSTYLED */
|
|
|
|
|
|
|
|
|
|
/* dsl_pool.c */
|
|
|
|
|
|
|
|
|
|
/* dnode.c */
|
|
|
|
|
extern int zfs_default_bs;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, default_bs, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_default_bs, 0, "Default dnode block shift");
|
|
|
|
|
&zfs_default_bs, 0, "Default dnode block shift");
|
|
|
|
|
|
|
|
|
|
extern int zfs_default_ibs;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, default_ibs, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_default_ibs, 0, "Default dnode indirect block shift");
|
|
|
|
|
&zfs_default_ibs, 0, "Default dnode indirect block shift");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* dsl_scan.c */
|
|
|
|
|
|
|
|
|
|
/* metaslab.c */
|
|
|
|
|
|
|
|
|
|
/* BEGIN CSTYLED */
|
|
|
|
|
/*
|
|
|
|
|
* In pools where the log space map feature is not enabled we touch
|
|
|
|
|
* multiple metaslabs (and their respective space maps) with each
|
|
|
|
@@ -379,9 +383,9 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, default_ibs, CTLFLAG_RWTUN,
|
|
|
|
|
*/
|
|
|
|
|
extern int zfs_metaslab_sm_blksz_no_log;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, sm_blksz_no_log, CTLFLAG_RDTUN,
|
|
|
|
|
&zfs_metaslab_sm_blksz_no_log, 0,
|
|
|
|
|
"Block size for space map in pools with log space map disabled. "
|
|
|
|
|
"Power of 2 and greater than 4096.");
|
|
|
|
|
&zfs_metaslab_sm_blksz_no_log, 0,
|
|
|
|
|
"Block size for space map in pools with log space map disabled. "
|
|
|
|
|
"Power of 2 greater than 4096.");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* When the log space map feature is enabled, we accumulate a lot of
|
|
|
|
@@ -390,9 +394,9 @@ SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, sm_blksz_no_log, CTLFLAG_RDTUN,
|
|
|
|
|
*/
|
|
|
|
|
extern int zfs_metaslab_sm_blksz_with_log;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, sm_blksz_with_log, CTLFLAG_RDTUN,
|
|
|
|
|
&zfs_metaslab_sm_blksz_with_log, 0,
|
|
|
|
|
"Block size for space map in pools with log space map enabled. "
|
|
|
|
|
"Power of 2 and greater than 4096.");
|
|
|
|
|
&zfs_metaslab_sm_blksz_with_log, 0,
|
|
|
|
|
"Block size for space map in pools with log space map enabled. "
|
|
|
|
|
"Power of 2 greater than 4096.");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* The in-core space map representation is more compact than its on-disk form.
|
|
|
|
@@ -402,19 +406,19 @@ SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, sm_blksz_with_log, CTLFLAG_RDTUN,
|
|
|
|
|
*/
|
|
|
|
|
extern int zfs_condense_pct;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, condense_pct, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_condense_pct, 0,
|
|
|
|
|
"Condense on-disk spacemap when it is more than this many percents"
|
|
|
|
|
" of in-memory counterpart");
|
|
|
|
|
&zfs_condense_pct, 0,
|
|
|
|
|
"Condense on-disk spacemap when it is more than this many percents"
|
|
|
|
|
" of in-memory counterpart");
|
|
|
|
|
|
|
|
|
|
extern int zfs_remove_max_segment;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, remove_max_segment, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_remove_max_segment, 0, "Largest contiguous segment ZFS will attempt to"
|
|
|
|
|
" allocate when removing a device");
|
|
|
|
|
&zfs_remove_max_segment, 0, "Largest contiguous segment ZFS will"
|
|
|
|
|
" attempt to allocate when removing a device");
|
|
|
|
|
|
|
|
|
|
extern int zfs_removal_suspend_progress;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, removal_suspend_progress, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_removal_suspend_progress, 0, "Ensures certain actions can happen while"
|
|
|
|
|
" in the middle of a removal");
|
|
|
|
|
&zfs_removal_suspend_progress, 0,
|
|
|
|
|
"Ensures certain actions can happen while in the middle of a removal");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@@ -425,8 +429,8 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, removal_suspend_progress, CTLFLAG_RWTUN,
|
|
|
|
|
*/
|
|
|
|
|
extern uint64_t metaslab_df_alloc_threshold;
|
|
|
|
|
SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, df_alloc_threshold, CTLFLAG_RWTUN,
|
|
|
|
|
&metaslab_df_alloc_threshold, 0,
|
|
|
|
|
"Minimum size which forces the dynamic allocator to change it's allocation strategy");
|
|
|
|
|
&metaslab_df_alloc_threshold, 0, "Minimum size which forces the dynamic"
|
|
|
|
|
" allocator to change its allocation strategy");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* The minimum free space, in percent, which must be available
|
|
|
|
@@ -436,41 +440,42 @@ SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, df_alloc_threshold, CTLFLAG_RWTUN,
|
|
|
|
|
*/
|
|
|
|
|
extern int metaslab_df_free_pct;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, df_free_pct, CTLFLAG_RWTUN,
|
|
|
|
|
&metaslab_df_free_pct, 0,
|
|
|
|
|
"The minimum free space, in percent, which must be available in a "
|
|
|
|
|
"space map to continue allocations in a first-fit fashion");
|
|
|
|
|
&metaslab_df_free_pct, 0,
|
|
|
|
|
"The minimum free space, in percent, which must be available in a"
|
|
|
|
|
" space map to continue allocations in a first-fit fashion");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Percentage of all cpus that can be used by the metaslab taskq.
|
|
|
|
|
*/
|
|
|
|
|
extern int metaslab_load_pct;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, load_pct, CTLFLAG_RWTUN,
|
|
|
|
|
&metaslab_load_pct, 0,
|
|
|
|
|
"Percentage of cpus that can be used by the metaslab taskq");
|
|
|
|
|
&metaslab_load_pct, 0,
|
|
|
|
|
"Percentage of cpus that can be used by the metaslab taskq");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Max number of metaslabs per group to preload.
|
|
|
|
|
*/
|
|
|
|
|
extern int metaslab_preload_limit;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, preload_limit, CTLFLAG_RWTUN,
|
|
|
|
|
&metaslab_preload_limit, 0,
|
|
|
|
|
"Max number of metaslabs per group to preload");
|
|
|
|
|
&metaslab_preload_limit, 0,
|
|
|
|
|
"Max number of metaslabs per group to preload");
|
|
|
|
|
|
|
|
|
|
/* spa.c */
|
|
|
|
|
extern int zfs_ccw_retry_interval;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, ccw_retry_interval, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_ccw_retry_interval, 0,
|
|
|
|
|
"Configuration cache file write, retry after failure, interval (seconds)");
|
|
|
|
|
&zfs_ccw_retry_interval, 0, "Configuration cache file write,"
|
|
|
|
|
" retry after failure, interval (seconds)");
|
|
|
|
|
|
|
|
|
|
extern uint64_t zfs_max_missing_tvds_cachefile;
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, max_missing_tvds_cachefile, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_max_missing_tvds_cachefile, 0,
|
|
|
|
|
"allow importing pools with missing top-level vdevs in cache file");
|
|
|
|
|
&zfs_max_missing_tvds_cachefile, 0,
|
|
|
|
|
"allow importing pools with missing top-level vdevs in cache file");
|
|
|
|
|
|
|
|
|
|
extern uint64_t zfs_max_missing_tvds_scan;
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, max_missing_tvds_scan, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_max_missing_tvds_scan, 0,
|
|
|
|
|
"allow importing pools with missing top-level vdevs during scan");
|
|
|
|
|
&zfs_max_missing_tvds_scan, 0,
|
|
|
|
|
"allow importing pools with missing top-level vdevs during scan");
|
|
|
|
|
/* END CSTYLED */
|
|
|
|
|
|
|
|
|
|
/* spa_misc.c */
|
|
|
|
|
extern int zfs_flags;
|
|
|
|
@@ -497,9 +502,11 @@ sysctl_vfs_zfs_debug_flags(SYSCTL_HANDLER_ARGS)
|
|
|
|
|
return (0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* BEGIN CSTYLED */
|
|
|
|
|
SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags,
|
|
|
|
|
CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, NULL, 0,
|
|
|
|
|
sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing.");
|
|
|
|
|
CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, NULL, 0,
|
|
|
|
|
sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing.");
|
|
|
|
|
/* END CSTYLED */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
param_set_deadman_synctime(SYSCTL_HANDLER_ARGS)
|
|
|
|
@@ -549,11 +556,11 @@ param_set_deadman_failmode(SYSCTL_HANDLER_ARGS)
|
|
|
|
|
return (rc);
|
|
|
|
|
if (strcmp(buf, zfs_deadman_failmode) == 0)
|
|
|
|
|
return (0);
|
|
|
|
|
if (!strcmp(buf, "wait"))
|
|
|
|
|
if (strcmp(buf, "wait") == 0)
|
|
|
|
|
zfs_deadman_failmode = "wait";
|
|
|
|
|
if (!strcmp(buf, "continue"))
|
|
|
|
|
if (strcmp(buf, "continue") == 0)
|
|
|
|
|
zfs_deadman_failmode = "continue";
|
|
|
|
|
if (!strcmp(buf, "panic"))
|
|
|
|
|
if (strcmp(buf, "panic") == 0)
|
|
|
|
|
zfs_deadman_failmode = "panic";
|
|
|
|
|
|
|
|
|
|
return (-param_set_deadman_failmode_common(buf));
|
|
|
|
@@ -563,7 +570,7 @@ param_set_deadman_failmode(SYSCTL_HANDLER_ARGS)
|
|
|
|
|
/* spacemap.c */
|
|
|
|
|
extern int space_map_ibs;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, space_map_ibs, CTLFLAG_RWTUN,
|
|
|
|
|
&space_map_ibs, 0, "Space map indirect block shift");
|
|
|
|
|
&space_map_ibs, 0, "Space map indirect block shift");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* vdev.c */
|
|
|
|
@@ -605,17 +612,18 @@ param_set_max_auto_ashift(SYSCTL_HANDLER_ARGS)
|
|
|
|
|
return (0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* BEGIN CSTYLED */
|
|
|
|
|
SYSCTL_PROC(_vfs_zfs, OID_AUTO, min_auto_ashift,
|
|
|
|
|
CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
|
|
|
|
&zfs_vdev_min_auto_ashift, sizeof (zfs_vdev_min_auto_ashift),
|
|
|
|
|
param_set_min_auto_ashift, "QU",
|
|
|
|
|
"Min ashift used when creating new top-level vdev. (LEGACY)");
|
|
|
|
|
CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
|
|
|
|
&zfs_vdev_min_auto_ashift, sizeof (zfs_vdev_min_auto_ashift),
|
|
|
|
|
param_set_min_auto_ashift, "QU",
|
|
|
|
|
"Min ashift used when creating new top-level vdev. (LEGACY)");
|
|
|
|
|
SYSCTL_PROC(_vfs_zfs, OID_AUTO, max_auto_ashift,
|
|
|
|
|
CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
|
|
|
|
&zfs_vdev_max_auto_ashift, sizeof (zfs_vdev_max_auto_ashift),
|
|
|
|
|
param_set_max_auto_ashift, "QU",
|
|
|
|
|
"Max ashift used when optimizing for logical -> physical sector size on "
|
|
|
|
|
"new top-level vdevs. (LEGACY)");
|
|
|
|
|
CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
|
|
|
|
&zfs_vdev_max_auto_ashift, sizeof (zfs_vdev_max_auto_ashift),
|
|
|
|
|
param_set_max_auto_ashift, "QU",
|
|
|
|
|
"Max ashift used when optimizing for logical -> physical sector size on"
|
|
|
|
|
" new top-level vdevs. (LEGACY)");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Since the DTL space map of a vdev is not expected to have a lot of
|
|
|
|
@@ -623,8 +631,8 @@ SYSCTL_PROC(_vfs_zfs, OID_AUTO, max_auto_ashift,
|
|
|
|
|
*/
|
|
|
|
|
extern int zfs_vdev_dtl_sm_blksz;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, dtl_sm_blksz, CTLFLAG_RDTUN,
|
|
|
|
|
&zfs_vdev_dtl_sm_blksz, 0,
|
|
|
|
|
"Block size for DTL space map. Power of 2 and greater than 4096.");
|
|
|
|
|
&zfs_vdev_dtl_sm_blksz, 0,
|
|
|
|
|
"Block size for DTL space map. Power of 2 greater than 4096.");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* vdev-wide space maps that have lots of entries written to them at
|
|
|
|
@@ -633,13 +641,13 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, dtl_sm_blksz, CTLFLAG_RDTUN,
|
|
|
|
|
*/
|
|
|
|
|
extern int zfs_vdev_standard_sm_blksz;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, standard_sm_blksz, CTLFLAG_RDTUN,
|
|
|
|
|
&zfs_vdev_standard_sm_blksz, 0,
|
|
|
|
|
"Block size for standard space map. Power of 2 and greater than 4096.");
|
|
|
|
|
&zfs_vdev_standard_sm_blksz, 0,
|
|
|
|
|
"Block size for standard space map. Power of 2 greater than 4096.");
|
|
|
|
|
/* END CSTYLED */
|
|
|
|
|
|
|
|
|
|
extern int vdev_validate_skip;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs, OID_AUTO, validate_skip, CTLFLAG_RDTUN,
|
|
|
|
|
&vdev_validate_skip, 0,
|
|
|
|
|
"Enable to bypass vdev_validate().");
|
|
|
|
|
&vdev_validate_skip, 0, "Enable to bypass vdev_validate().");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* vdev_cache.c */
|
|
|
|
@@ -657,55 +665,23 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, validate_skip, CTLFLAG_RDTUN,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* vdev_queue.c */
|
|
|
|
|
#define ZFS_VDEV_QUEUE_KNOB_MIN(name) \
|
|
|
|
|
extern uint32_t zfs_vdev_ ## name ## _min_active; \
|
|
|
|
|
SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _min_active, CTLFLAG_RWTUN,\
|
|
|
|
|
&zfs_vdev_ ## name ## _min_active, 0, \
|
|
|
|
|
"Initial number of I/O requests of type " #name \
|
|
|
|
|
" active for each device");
|
|
|
|
|
|
|
|
|
|
#define ZFS_VDEV_QUEUE_KNOB_MAX(name) \
|
|
|
|
|
extern uint32_t zfs_vdev_ ## name ## _max_active; \
|
|
|
|
|
SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _max_active, CTLFLAG_RWTUN, \
|
|
|
|
|
&zfs_vdev_ ## name ## _max_active, 0, \
|
|
|
|
|
"Maximum number of I/O requests of type " #name \
|
|
|
|
|
" active for each device");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef ZFS_VDEV_QUEUE_KNOB
|
|
|
|
|
|
|
|
|
|
/* BEGIN CSTYLED */
|
|
|
|
|
extern uint32_t zfs_vdev_max_active;
|
|
|
|
|
SYSCTL_UINT(_vfs_zfs, OID_AUTO, top_maxinflight, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_vdev_max_active, 0,
|
|
|
|
|
"The maximum number of I/Os of all types active for each device. (LEGACY)");
|
|
|
|
|
&zfs_vdev_max_active, 0,
|
|
|
|
|
"The maximum number of I/Os of all types active for each device."
|
|
|
|
|
" (LEGACY)");
|
|
|
|
|
|
|
|
|
|
extern int zfs_vdev_def_queue_depth;
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, def_queue_depth, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_vdev_def_queue_depth, 0,
|
|
|
|
|
"Default queue depth for each allocator");
|
|
|
|
|
|
|
|
|
|
/*extern uint64_t zfs_multihost_history;
|
|
|
|
|
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, multihost_history, CTLFLAG_RWTUN,
|
|
|
|
|
&zfs_multihost_history, 0,
|
|
|
|
|
"Historical staticists for the last N multihost updates");*/
|
|
|
|
|
|
|
|
|
|
#ifdef notyet
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, trim_on_init, CTLFLAG_RW,
|
|
|
|
|
&vdev_trim_on_init, 0, "Enable/disable full vdev trim on initialisation");
|
|
|
|
|
#endif
|
|
|
|
|
&zfs_vdev_def_queue_depth, 0,
|
|
|
|
|
"Default queue depth for each allocator");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* zio.c */
|
|
|
|
|
#if defined(__LP64__)
|
|
|
|
|
int zio_use_uma = 1;
|
|
|
|
|
#else
|
|
|
|
|
int zio_use_uma = 0;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, &zio_use_uma, 0,
|
|
|
|
|
"Use uma(9) for ZIO allocations");
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, exclude_metadata, CTLFLAG_RDTUN, &zio_exclude_metadata, 0,
|
|
|
|
|
"Exclude metadata buffers from dumps as well");
|
|
|
|
|
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, exclude_metadata, CTLFLAG_RDTUN,
|
|
|
|
|
&zio_exclude_metadata, 0,
|
|
|
|
|
"Exclude metadata buffers from dumps as well");
|
|
|
|
|
/* END CSTYLED */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
param_set_slop_shift(SYSCTL_HANDLER_ARGS)
|
|
|
|
|