diff options
author | наб <[email protected]> | 2022-01-15 00:37:55 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-14 15:37:55 -0800 |
commit | 18168da727427e28914235137daebe06c23069cd (patch) | |
tree | 71a8769a2a12dd4add4f7abfb5a1e4f51f09cf18 /module/os/linux/zfs/zvol_os.c | |
parent | 7adc19009817303af10c8b3b7617850994cfb9e2 (diff) |
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 <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12899
Diffstat (limited to 'module/os/linux/zfs/zvol_os.c')
-rw-r--r-- | module/os/linux/zfs/zvol_os.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c index 69479b3f7..cef52e224 100644 --- a/module/os/linux/zfs/zvol_os.c +++ b/module/os/linux/zfs/zvol_os.c @@ -41,12 +41,12 @@ #include <linux/blkdev_compat.h> #include <linux/task_io_accounting_ops.h> -unsigned int zvol_major = ZVOL_MAJOR; -unsigned int zvol_request_sync = 0; -unsigned int zvol_prefetch_bytes = (128 * 1024); -unsigned long zvol_max_discard_blocks = 16384; -unsigned int zvol_threads = 32; -unsigned int zvol_open_timeout_ms = 1000; +static unsigned int zvol_major = ZVOL_MAJOR; +static unsigned int zvol_request_sync = 0; +static unsigned int zvol_prefetch_bytes = (128 * 1024); +static unsigned long zvol_max_discard_blocks = 16384; +static unsigned int zvol_threads = 32; +static const unsigned int zvol_open_timeout_ms = 1000; struct zvol_state_os { struct gendisk *zvo_disk; /* generic disk */ @@ -802,7 +802,7 @@ zvol_getgeo(struct block_device *bdev, struct hd_geometry *geo) return (0); } -static struct block_device_operations zvol_ops = { +static const struct block_device_operations zvol_ops = { .open = zvol_open, .release = zvol_release, .ioctl = zvol_ioctl, |