mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
module/*.ko: prune .data, global .rodata
Evaluated every variable that lives in .data (and globals in .rodata) in the kernel modules, and constified/eliminated/localised them appropriately. This means that all read-only data is now actually read-only data, and, if possible, at file scope. A lot of previously- global-symbols became inlinable (and inlined!) constants. Probably not in a big Wowee Performance Moment, but hey. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12899
This commit is contained in:
+11
-11
@@ -81,22 +81,22 @@
|
||||
* 1 << (spa_slop_shift + 1), on small pools the usable space may be reduced
|
||||
* (by more than 1<<spa_slop_shift) due to the embedded slog metaslab.
|
||||
*/
|
||||
int zfs_embedded_slog_min_ms = 64;
|
||||
static int zfs_embedded_slog_min_ms = 64;
|
||||
|
||||
/* default target for number of metaslabs per top-level vdev */
|
||||
int zfs_vdev_default_ms_count = 200;
|
||||
static int zfs_vdev_default_ms_count = 200;
|
||||
|
||||
/* minimum number of metaslabs per top-level vdev */
|
||||
int zfs_vdev_min_ms_count = 16;
|
||||
static int zfs_vdev_min_ms_count = 16;
|
||||
|
||||
/* practical upper limit of total metaslabs per top-level vdev */
|
||||
int zfs_vdev_ms_count_limit = 1ULL << 17;
|
||||
static int zfs_vdev_ms_count_limit = 1ULL << 17;
|
||||
|
||||
/* lower limit for metaslab size (512M) */
|
||||
int zfs_vdev_default_ms_shift = 29;
|
||||
static int zfs_vdev_default_ms_shift = 29;
|
||||
|
||||
/* upper limit for metaslab size (16G) */
|
||||
int zfs_vdev_max_ms_shift = 34;
|
||||
static const int zfs_vdev_max_ms_shift = 34;
|
||||
|
||||
int vdev_validate_skip = B_FALSE;
|
||||
|
||||
@@ -109,18 +109,18 @@ int zfs_vdev_dtl_sm_blksz = (1 << 12);
|
||||
/*
|
||||
* Rate limit slow IO (delay) events to this many per second.
|
||||
*/
|
||||
unsigned int zfs_slow_io_events_per_second = 20;
|
||||
static unsigned int zfs_slow_io_events_per_second = 20;
|
||||
|
||||
/*
|
||||
* Rate limit checksum events after this many checksum errors per second.
|
||||
*/
|
||||
unsigned int zfs_checksum_events_per_second = 20;
|
||||
static unsigned int zfs_checksum_events_per_second = 20;
|
||||
|
||||
/*
|
||||
* Ignore errors during scrub/resilver. Allows to work around resilver
|
||||
* upon import when there are pool errors.
|
||||
*/
|
||||
int zfs_scan_ignore_errors = 0;
|
||||
static int zfs_scan_ignore_errors = 0;
|
||||
|
||||
/*
|
||||
* vdev-wide space maps that have lots of entries written to them at
|
||||
@@ -216,7 +216,7 @@ vdev_dbgmsg_print_tree(vdev_t *vd, int indent)
|
||||
* Virtual device management.
|
||||
*/
|
||||
|
||||
static vdev_ops_t *vdev_ops_table[] = {
|
||||
static const vdev_ops_t *const vdev_ops_table[] = {
|
||||
&vdev_root_ops,
|
||||
&vdev_raidz_ops,
|
||||
&vdev_draid_ops,
|
||||
@@ -238,7 +238,7 @@ static vdev_ops_t *vdev_ops_table[] = {
|
||||
static vdev_ops_t *
|
||||
vdev_getops(const char *type)
|
||||
{
|
||||
vdev_ops_t *ops, **opspp;
|
||||
const vdev_ops_t *ops, *const *opspp;
|
||||
|
||||
for (opspp = vdev_ops_table; (ops = *opspp) != NULL; opspp++)
|
||||
if (strcmp(ops->vdev_op_type, type) == 0)
|
||||
|
||||
Reference in New Issue
Block a user