Re-commit the zfs sysctl(9) type-safety changes.
Thanks to dim and pjd for the pointer to zfs_context.h for building userland.
This commit is contained in:
parent
d244b2279c
commit
e704482d43
@ -601,6 +601,7 @@ typedef uint32_t idmap_rid_t;
|
||||
#define SYSCTL_UINT(...)
|
||||
#define SYSCTL_ULONG(...)
|
||||
#define SYSCTL_QUAD(...)
|
||||
#define SYSCTL_UQUAD(...)
|
||||
#ifdef TUNABLE_INT
|
||||
#undef TUNABLE_INT
|
||||
#undef TUNABLE_ULONG
|
||||
|
@ -188,9 +188,9 @@ TUNABLE_QUAD("vfs.zfs.arc_min", &zfs_arc_min);
|
||||
TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit);
|
||||
TUNABLE_INT("vfs.zfs.mdcomp_disable", &zfs_mdcomp_disable);
|
||||
SYSCTL_DECL(_vfs_zfs);
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0,
|
||||
"Maximum ARC size");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0,
|
||||
"Minimum ARC size");
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN,
|
||||
&zfs_mdcomp_disable, 0, "Disable metadata compression");
|
||||
@ -466,9 +466,9 @@ static uint64_t arc_loaned_bytes;
|
||||
static uint64_t arc_meta_used;
|
||||
static uint64_t arc_meta_limit;
|
||||
static uint64_t arc_meta_max = 0;
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN,
|
||||
&arc_meta_used, 0, "ARC metadata used");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN,
|
||||
&arc_meta_limit, 0, "ARC metadata limit");
|
||||
|
||||
typedef struct l2arc_buf_hdr l2arc_buf_hdr_t;
|
||||
@ -638,15 +638,15 @@ boolean_t l2arc_noprefetch = B_FALSE; /* don't cache prefetch bufs */
|
||||
boolean_t l2arc_feed_again = B_TRUE; /* turbo warmup */
|
||||
boolean_t l2arc_norw = B_TRUE; /* no reads during writes */
|
||||
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW,
|
||||
&l2arc_write_max, 0, "max write size");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW,
|
||||
&l2arc_write_boost, 0, "extra write during warmup");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW,
|
||||
&l2arc_headroom, 0, "number of dev writes");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW,
|
||||
&l2arc_feed_secs, 0, "interval seconds");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW,
|
||||
&l2arc_feed_min_ms, 0, "min interval milliseconds");
|
||||
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RW,
|
||||
@ -656,46 +656,46 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_feed_again, CTLFLAG_RW,
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RW,
|
||||
&l2arc_norw, 0, "no reads during writes");
|
||||
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD,
|
||||
&ARC_anon.arcs_size, 0, "size of anonymous state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_metadata_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_metadata_lsize, CTLFLAG_RD,
|
||||
&ARC_anon.arcs_lsize[ARC_BUFC_METADATA], 0, "size of anonymous state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_data_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_data_lsize, CTLFLAG_RD,
|
||||
&ARC_anon.arcs_lsize[ARC_BUFC_DATA], 0, "size of anonymous state");
|
||||
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD,
|
||||
&ARC_mru.arcs_size, 0, "size of mru state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_metadata_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_metadata_lsize, CTLFLAG_RD,
|
||||
&ARC_mru.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mru state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_data_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_data_lsize, CTLFLAG_RD,
|
||||
&ARC_mru.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mru state");
|
||||
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_size, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_size, CTLFLAG_RD,
|
||||
&ARC_mru_ghost.arcs_size, 0, "size of mru ghost state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_lsize, CTLFLAG_RD,
|
||||
&ARC_mru_ghost.arcs_lsize[ARC_BUFC_METADATA], 0,
|
||||
"size of metadata in mru ghost state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_lsize, CTLFLAG_RD,
|
||||
&ARC_mru_ghost.arcs_lsize[ARC_BUFC_DATA], 0,
|
||||
"size of data in mru ghost state");
|
||||
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_size, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_size, CTLFLAG_RD,
|
||||
&ARC_mfu.arcs_size, 0, "size of mfu state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_metadata_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_metadata_lsize, CTLFLAG_RD,
|
||||
&ARC_mfu.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mfu state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_data_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_data_lsize, CTLFLAG_RD,
|
||||
&ARC_mfu.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mfu state");
|
||||
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_size, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_size, CTLFLAG_RD,
|
||||
&ARC_mfu_ghost.arcs_size, 0, "size of mfu ghost state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_lsize, CTLFLAG_RD,
|
||||
&ARC_mfu_ghost.arcs_lsize[ARC_BUFC_METADATA], 0,
|
||||
"size of metadata in mfu ghost state");
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_lsize, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_lsize, CTLFLAG_RD,
|
||||
&ARC_mfu_ghost.arcs_lsize[ARC_BUFC_DATA], 0,
|
||||
"size of data in mfu ghost state");
|
||||
|
||||
SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD,
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD,
|
||||
&ARC_l2c_only.arcs_size, 0, "size of mru state");
|
||||
|
||||
/*
|
||||
|
@ -61,7 +61,7 @@ TUNABLE_INT("vfs.zfs.zfetch.block_cap", &zfetch_block_cap);
|
||||
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, block_cap, CTLFLAG_RDTUN,
|
||||
&zfetch_block_cap, 0, "Max number of blocks to fetch at a time");
|
||||
TUNABLE_QUAD("vfs.zfs.zfetch.array_rd_sz", &zfetch_array_rd_sz);
|
||||
SYSCTL_QUAD(_vfs_zfs_zfetch, OID_AUTO, array_rd_sz, CTLFLAG_RDTUN,
|
||||
SYSCTL_UQUAD(_vfs_zfs_zfetch, OID_AUTO, array_rd_sz, CTLFLAG_RDTUN,
|
||||
&zfetch_array_rd_sz, 0,
|
||||
"Number of bytes in a array_read at which we stop prefetching");
|
||||
|
||||
|
@ -50,7 +50,7 @@ TUNABLE_INT("vfs.zfs.txg.synctime", &zfs_txg_synctime);
|
||||
SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, synctime, CTLFLAG_RDTUN, &zfs_txg_synctime,
|
||||
0, "Target seconds to sync a txg");
|
||||
TUNABLE_QUAD("vfs.zfs.txg.write_limit_override", &zfs_write_limit_override);
|
||||
SYSCTL_QUAD(_vfs_zfs_txg, OID_AUTO, write_limit_override, CTLFLAG_RW,
|
||||
SYSCTL_UQUAD(_vfs_zfs_txg, OID_AUTO, write_limit_override, CTLFLAG_RW,
|
||||
&zfs_write_limit_override, 0,
|
||||
"Override maximum size of a txg to this size in bytes, "
|
||||
"value of 0 means don't override");
|
||||
|
Loading…
Reference in New Issue
Block a user