mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
FreeBSD: Add legacy arc_min and arc_max
These tunables were renamed from vfs.zfs.arc_min and vfs.zfs.arc_max to vfs.zfs.arc.min and vfs.zfs.arc.max. Add legacy compat tunables for the old names. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10579
This commit is contained in:
parent
ceadc0dbbd
commit
0421f257b2
@ -101,7 +101,7 @@ zdb_ot_name(dmu_object_type_t type)
|
||||
|
||||
extern int reference_tracking_enable;
|
||||
extern int zfs_recover;
|
||||
extern uint64_t zfs_arc_min, zfs_arc_max, zfs_arc_meta_min, zfs_arc_meta_limit;
|
||||
extern unsigned long zfs_arc_meta_min, zfs_arc_meta_limit;
|
||||
extern int zfs_vdev_async_read_max_active;
|
||||
extern boolean_t spa_load_verify_dryrun;
|
||||
extern int zfs_reconstruct_indirect_combinations_max;
|
||||
|
@ -889,6 +889,8 @@ extern arc_state_t *arc_mfu;
|
||||
extern arc_state_t *arc_mru;
|
||||
extern uint_t zfs_arc_pc_percent;
|
||||
extern int arc_lotsfree_percent;
|
||||
extern unsigned long zfs_arc_min;
|
||||
extern unsigned long zfs_arc_max;
|
||||
|
||||
extern void arc_reduce_target_size(int64_t to_free);
|
||||
extern boolean_t arc_reclaim_needed(void);
|
||||
|
@ -264,6 +264,42 @@ sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS)
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_no_grow_shift, CTLTYPE_U32 | CTLFLAG_RWTUN,
|
||||
0, sizeof (uint32_t), sysctl_vfs_zfs_arc_no_grow_shift, "U",
|
||||
"log2(fraction of ARC which must be free to allow growing)");
|
||||
|
||||
int
|
||||
param_set_arc_long(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = sysctl_handle_long(oidp, arg1, 0, req);
|
||||
if (err != 0 || req->newptr == NULL)
|
||||
return (err);
|
||||
|
||||
arc_tuning_update(B_TRUE);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
param_set_arc_int(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = sysctl_handle_int(oidp, arg1, 0, req);
|
||||
if (err != 0 || req->newptr == NULL)
|
||||
return (err);
|
||||
|
||||
arc_tuning_update(B_TRUE);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_min, CTLTYPE_ULONG | CTLFLAG_RWTUN,
|
||||
&zfs_arc_min, sizeof (zfs_arc_min), param_set_arc_long, "LU",
|
||||
"min arc size (LEGACY)");
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_max, CTLTYPE_ULONG | CTLFLAG_RWTUN,
|
||||
&zfs_arc_max, sizeof (zfs_arc_max), param_set_arc_long, "LU",
|
||||
"max arc size (LEGACY)");
|
||||
|
||||
/* dbuf.c */
|
||||
|
||||
|
||||
@ -643,35 +679,6 @@ SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, &zio_use_uma, 0,
|
||||
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, exclude_metadata, CTLFLAG_RDTUN, &zio_exclude_metadata, 0,
|
||||
"Exclude metadata buffers from dumps as well");
|
||||
|
||||
|
||||
int
|
||||
param_set_arc_long(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = sysctl_handle_long(oidp, arg1, 0, req);
|
||||
if (err != 0 || req->newptr == NULL)
|
||||
return (err);
|
||||
|
||||
arc_tuning_update(B_TRUE);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
param_set_arc_int(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = sysctl_handle_int(oidp, arg1, 0, req);
|
||||
if (err != 0 || req->newptr == NULL)
|
||||
return (err);
|
||||
|
||||
arc_tuning_update(B_TRUE);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
param_set_slop_shift(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user