mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +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:
@@ -44,17 +44,14 @@
|
||||
#include <sys/random.h>
|
||||
#include <sys/strings.h>
|
||||
#include <linux/kmod.h>
|
||||
#include "zfs_gitrev.h"
|
||||
#include <linux/mod_compat.h>
|
||||
#include <sys/cred.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
char spl_gitrev[64] = ZFS_META_GITREV;
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
unsigned long spl_hostid = 0;
|
||||
EXPORT_SYMBOL(spl_hostid);
|
||||
/* BEGIN CSTYLED */
|
||||
|
||||
module_param(spl_hostid, ulong, 0644);
|
||||
MODULE_PARM_DESC(spl_hostid, "The system hostid.");
|
||||
/* END CSTYLED */
|
||||
@@ -632,7 +629,7 @@ spl_getattr(struct file *filp, struct kstat *stat)
|
||||
*
|
||||
*/
|
||||
|
||||
char *spl_hostid_path = HW_HOSTID_PATH;
|
||||
static char *spl_hostid_path = HW_HOSTID_PATH;
|
||||
module_param(spl_hostid_path, charp, 0444);
|
||||
MODULE_PARM_DESC(spl_hostid_path, "The system hostid file (/etc/hostid)");
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
* will be limited to 2-256 objects per magazine (i.e per cpu). Magazines
|
||||
* may never be entirely disabled in this implementation.
|
||||
*/
|
||||
unsigned int spl_kmem_cache_magazine_size = 0;
|
||||
static unsigned int spl_kmem_cache_magazine_size = 0;
|
||||
module_param(spl_kmem_cache_magazine_size, uint, 0444);
|
||||
MODULE_PARM_DESC(spl_kmem_cache_magazine_size,
|
||||
"Default magazine size (2-256), set automatically (0)");
|
||||
@@ -84,15 +84,15 @@ MODULE_PARM_DESC(spl_kmem_cache_magazine_size,
|
||||
* setting this value to KMC_RECLAIM_ONCE limits how aggressively the cache
|
||||
* is reclaimed. This may increase the likelihood of out of memory events.
|
||||
*/
|
||||
unsigned int spl_kmem_cache_reclaim = 0 /* KMC_RECLAIM_ONCE */;
|
||||
static unsigned int spl_kmem_cache_reclaim = 0 /* KMC_RECLAIM_ONCE */;
|
||||
module_param(spl_kmem_cache_reclaim, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_kmem_cache_reclaim, "Single reclaim pass (0x1)");
|
||||
|
||||
unsigned int spl_kmem_cache_obj_per_slab = SPL_KMEM_CACHE_OBJ_PER_SLAB;
|
||||
static unsigned int spl_kmem_cache_obj_per_slab = SPL_KMEM_CACHE_OBJ_PER_SLAB;
|
||||
module_param(spl_kmem_cache_obj_per_slab, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_kmem_cache_obj_per_slab, "Number of objects per slab");
|
||||
|
||||
unsigned int spl_kmem_cache_max_size = SPL_KMEM_CACHE_MAX_SIZE;
|
||||
static unsigned int spl_kmem_cache_max_size = SPL_KMEM_CACHE_MAX_SIZE;
|
||||
module_param(spl_kmem_cache_max_size, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size of slab in MB");
|
||||
|
||||
@@ -103,7 +103,7 @@ MODULE_PARM_DESC(spl_kmem_cache_max_size, "Maximum size of slab in MB");
|
||||
* of 16K was determined to be optimal for architectures using 4K pages and
|
||||
* to also work well on architecutres using larger 64K page sizes.
|
||||
*/
|
||||
unsigned int spl_kmem_cache_slab_limit = 16384;
|
||||
static unsigned int spl_kmem_cache_slab_limit = 16384;
|
||||
module_param(spl_kmem_cache_slab_limit, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_kmem_cache_slab_limit,
|
||||
"Objects less than N bytes use the Linux slab");
|
||||
@@ -112,7 +112,7 @@ MODULE_PARM_DESC(spl_kmem_cache_slab_limit,
|
||||
* The number of threads available to allocate new slabs for caches. This
|
||||
* should not need to be tuned but it is available for performance analysis.
|
||||
*/
|
||||
unsigned int spl_kmem_cache_kmem_threads = 4;
|
||||
static unsigned int spl_kmem_cache_kmem_threads = 4;
|
||||
module_param(spl_kmem_cache_kmem_threads, uint, 0444);
|
||||
MODULE_PARM_DESC(spl_kmem_cache_kmem_threads,
|
||||
"Number of spl_kmem_cache threads");
|
||||
|
||||
@@ -358,7 +358,7 @@ kstat_seq_stop(struct seq_file *f, void *v)
|
||||
mutex_exit(ksp->ks_lock);
|
||||
}
|
||||
|
||||
static struct seq_operations kstat_seq_ops = {
|
||||
static const struct seq_operations kstat_seq_ops = {
|
||||
.show = kstat_seq_show,
|
||||
.start = kstat_seq_start,
|
||||
.next = kstat_seq_next,
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/version.h>
|
||||
#include "zfs_gitrev.h"
|
||||
|
||||
#if defined(CONSTIFY_PLUGIN) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
typedef struct ctl_table __no_const spl_ctl_table;
|
||||
@@ -461,7 +462,7 @@ slab_seq_stop(struct seq_file *f, void *v)
|
||||
up_read(&spl_kmem_cache_sem);
|
||||
}
|
||||
|
||||
static struct seq_operations slab_seq_ops = {
|
||||
static const struct seq_operations slab_seq_ops = {
|
||||
.show = slab_seq_show,
|
||||
.start = slab_seq_start,
|
||||
.next = slab_seq_next,
|
||||
@@ -494,14 +495,14 @@ taskq_seq_stop(struct seq_file *f, void *v)
|
||||
up_read(&tq_list_sem);
|
||||
}
|
||||
|
||||
static struct seq_operations taskq_all_seq_ops = {
|
||||
static const struct seq_operations taskq_all_seq_ops = {
|
||||
.show = taskq_all_seq_show,
|
||||
.start = taskq_seq_start,
|
||||
.next = taskq_seq_next,
|
||||
.stop = taskq_seq_stop,
|
||||
};
|
||||
|
||||
static struct seq_operations taskq_seq_ops = {
|
||||
static const struct seq_operations taskq_seq_ops = {
|
||||
.show = taskq_seq_show,
|
||||
.start = taskq_seq_start,
|
||||
.next = taskq_seq_next,
|
||||
@@ -612,8 +613,8 @@ static struct ctl_table spl_table[] = {
|
||||
*/
|
||||
{
|
||||
.procname = "gitrev",
|
||||
.data = spl_gitrev,
|
||||
.maxlen = sizeof (spl_gitrev),
|
||||
.data = (char *)ZFS_META_GITREV,
|
||||
.maxlen = sizeof (ZFS_META_GITREV),
|
||||
.mode = 0444,
|
||||
.proc_handler = &proc_dostring,
|
||||
},
|
||||
|
||||
@@ -158,7 +158,7 @@ procfs_list_seq_stop(struct seq_file *f, void *p)
|
||||
mutex_exit(&procfs_list->pl_lock);
|
||||
}
|
||||
|
||||
static struct seq_operations procfs_list_seq_ops = {
|
||||
static const struct seq_operations procfs_list_seq_ops = {
|
||||
.show = procfs_list_seq_show,
|
||||
.start = procfs_list_seq_start,
|
||||
.next = procfs_list_seq_next,
|
||||
|
||||
@@ -32,21 +32,21 @@
|
||||
#include <linux/cpuhotplug.h>
|
||||
#endif
|
||||
|
||||
int spl_taskq_thread_bind = 0;
|
||||
static int spl_taskq_thread_bind = 0;
|
||||
module_param(spl_taskq_thread_bind, int, 0644);
|
||||
MODULE_PARM_DESC(spl_taskq_thread_bind, "Bind taskq thread to CPU by default");
|
||||
|
||||
|
||||
int spl_taskq_thread_dynamic = 1;
|
||||
static int spl_taskq_thread_dynamic = 1;
|
||||
module_param(spl_taskq_thread_dynamic, int, 0444);
|
||||
MODULE_PARM_DESC(spl_taskq_thread_dynamic, "Allow dynamic taskq threads");
|
||||
|
||||
int spl_taskq_thread_priority = 1;
|
||||
static int spl_taskq_thread_priority = 1;
|
||||
module_param(spl_taskq_thread_priority, int, 0644);
|
||||
MODULE_PARM_DESC(spl_taskq_thread_priority,
|
||||
"Allow non-default priority for taskq threads");
|
||||
|
||||
int spl_taskq_thread_sequential = 4;
|
||||
static int spl_taskq_thread_sequential = 4;
|
||||
module_param(spl_taskq_thread_sequential, int, 0644);
|
||||
MODULE_PARM_DESC(spl_taskq_thread_sequential,
|
||||
"Create new taskq threads after N sequential tasks");
|
||||
|
||||
@@ -127,8 +127,8 @@
|
||||
* space or MMIO space), the computer may explode.
|
||||
*/
|
||||
|
||||
static struct xdr_ops xdrmem_encode_ops;
|
||||
static struct xdr_ops xdrmem_decode_ops;
|
||||
static const struct xdr_ops xdrmem_encode_ops;
|
||||
static const struct xdr_ops xdrmem_decode_ops;
|
||||
|
||||
void
|
||||
xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size,
|
||||
@@ -489,7 +489,7 @@ fail:
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
static struct xdr_ops xdrmem_encode_ops = {
|
||||
static const struct xdr_ops xdrmem_encode_ops = {
|
||||
.xdr_control = xdrmem_control,
|
||||
.xdr_char = xdrmem_enc_char,
|
||||
.xdr_u_short = xdrmem_enc_ushort,
|
||||
@@ -500,7 +500,7 @@ static struct xdr_ops xdrmem_encode_ops = {
|
||||
.xdr_array = xdr_enc_array
|
||||
};
|
||||
|
||||
static struct xdr_ops xdrmem_decode_ops = {
|
||||
static const struct xdr_ops xdrmem_decode_ops = {
|
||||
.xdr_control = xdrmem_control,
|
||||
.xdr_char = xdrmem_dec_char,
|
||||
.xdr_u_short = xdrmem_dec_ushort,
|
||||
|
||||
@@ -149,8 +149,6 @@ struct {
|
||||
#define abd_for_each_sg(abd, sg, n, i) \
|
||||
for_each_sg(ABD_SCATTER(abd).abd_sgl, sg, n, i)
|
||||
|
||||
unsigned zfs_abd_scatter_max_order = MAX_ORDER - 1;
|
||||
|
||||
/*
|
||||
* zfs_abd_scatter_min_size is the minimum allocation size to use scatter
|
||||
* ABD's. Smaller allocations will use linear ABD's which uses
|
||||
@@ -173,7 +171,7 @@ unsigned zfs_abd_scatter_max_order = MAX_ORDER - 1;
|
||||
* By default we use linear allocations for 512B and 1KB, and scatter
|
||||
* allocations for larger (1.5KB and up).
|
||||
*/
|
||||
int zfs_abd_scatter_min_size = 512 * 3;
|
||||
static int zfs_abd_scatter_min_size = 512 * 3;
|
||||
|
||||
/*
|
||||
* We use a scattered SPA_MAXBLOCKSIZE sized ABD whose pages are
|
||||
@@ -221,6 +219,8 @@ abd_free_struct_impl(abd_t *abd)
|
||||
}
|
||||
|
||||
#ifdef _KERNEL
|
||||
static unsigned zfs_abd_scatter_max_order = MAX_ORDER - 1;
|
||||
|
||||
/*
|
||||
* Mark zfs data pages so they can be excluded from kernel crash dumps
|
||||
*/
|
||||
|
||||
@@ -919,7 +919,7 @@ param_set_vdev_scheduler(const char *val, zfs_kernel_param_t *kp)
|
||||
return (error);
|
||||
}
|
||||
|
||||
char *zfs_vdev_scheduler = "unused";
|
||||
static const char *zfs_vdev_scheduler = "unused";
|
||||
module_param_call(zfs_vdev_scheduler, param_set_vdev_scheduler,
|
||||
param_get_charp, &zfs_vdev_scheduler, 0644);
|
||||
MODULE_PARM_DESC(zfs_vdev_scheduler, "I/O scheduler");
|
||||
|
||||
@@ -53,8 +53,8 @@ static taskq_t *vdev_file_taskq;
|
||||
* impact the vdev_ashift setting which can only be set at vdev creation
|
||||
* time.
|
||||
*/
|
||||
unsigned long vdev_file_logical_ashift = SPA_MINBLOCKSHIFT;
|
||||
unsigned long vdev_file_physical_ashift = SPA_MINBLOCKSHIFT;
|
||||
static unsigned long vdev_file_logical_ashift = SPA_MINBLOCKSHIFT;
|
||||
static unsigned long vdev_file_physical_ashift = SPA_MINBLOCKSHIFT;
|
||||
|
||||
static void
|
||||
vdev_file_hold(vdev_t *vd)
|
||||
|
||||
@@ -171,7 +171,7 @@ zfs_ace_v0_data(void *acep, void **datap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static acl_ops_t zfs_acl_v0_ops = {
|
||||
static const acl_ops_t zfs_acl_v0_ops = {
|
||||
.ace_mask_get = zfs_ace_v0_get_mask,
|
||||
.ace_mask_set = zfs_ace_v0_set_mask,
|
||||
.ace_flags_get = zfs_ace_v0_get_flags,
|
||||
@@ -307,7 +307,7 @@ zfs_ace_fuid_data(void *acep, void **datap)
|
||||
}
|
||||
}
|
||||
|
||||
static acl_ops_t zfs_acl_fuid_ops = {
|
||||
static const acl_ops_t zfs_acl_fuid_ops = {
|
||||
.ace_mask_get = zfs_ace_fuid_get_mask,
|
||||
.ace_mask_set = zfs_ace_fuid_set_mask,
|
||||
.ace_flags_get = zfs_ace_fuid_get_flags,
|
||||
@@ -2702,7 +2702,7 @@ zfs_zaccess_unix(znode_t *zp, mode_t mode, cred_t *cr)
|
||||
}
|
||||
|
||||
/* See zfs_zaccess_delete() */
|
||||
int zfs_write_implies_delete_child = 1;
|
||||
static const boolean_t zfs_write_implies_delete_child = B_TRUE;
|
||||
|
||||
/*
|
||||
* Determine whether delete access should be granted.
|
||||
|
||||
@@ -110,7 +110,7 @@ static krwlock_t zfs_snapshot_lock;
|
||||
* Control Directory Tunables (.zfs)
|
||||
*/
|
||||
int zfs_expire_snapshot = ZFSCTL_EXPIRE_SNAPSHOT;
|
||||
int zfs_admin_snapshot = 0;
|
||||
static int zfs_admin_snapshot = 0;
|
||||
|
||||
typedef struct {
|
||||
char *se_name; /* full snapshot name */
|
||||
|
||||
@@ -33,8 +33,8 @@ typedef struct zfs_dbgmsg {
|
||||
char zdm_msg[1]; /* variable length allocation */
|
||||
} zfs_dbgmsg_t;
|
||||
|
||||
procfs_list_t zfs_dbgmsgs;
|
||||
int zfs_dbgmsg_size = 0;
|
||||
static procfs_list_t zfs_dbgmsgs;
|
||||
static int zfs_dbgmsg_size = 0;
|
||||
int zfs_dbgmsg_maxsize = 4<<20; /* 4MB */
|
||||
|
||||
/*
|
||||
@@ -49,7 +49,7 @@ int zfs_dbgmsg_maxsize = 4<<20; /* 4MB */
|
||||
* # Clear the kernel debug message log.
|
||||
* echo 0 >/proc/spl/kstat/zfs/dbgmsg
|
||||
*/
|
||||
int zfs_dbgmsg_enable = 1;
|
||||
int zfs_dbgmsg_enable = B_TRUE;
|
||||
|
||||
static int
|
||||
zfs_dbgmsg_show_header(struct seq_file *f)
|
||||
|
||||
@@ -320,7 +320,7 @@ mappedread(znode_t *zp, int nbytes, zfs_uio_t *uio)
|
||||
}
|
||||
#endif /* _KERNEL */
|
||||
|
||||
unsigned long zfs_delete_blocks = DMU_MAX_DELETEBLKCNT;
|
||||
static unsigned long zfs_delete_blocks = DMU_MAX_DELETEBLKCNT;
|
||||
|
||||
/*
|
||||
* Write the bytes to a file.
|
||||
|
||||
@@ -80,7 +80,7 @@ unsigned int zfs_object_mutex_size = ZFS_OBJ_MTX_SZ;
|
||||
* This is used by the test suite so that it can delay znodes from being
|
||||
* freed in order to inspect the unlinked set.
|
||||
*/
|
||||
int zfs_unlink_suspend_progress = 0;
|
||||
static int zfs_unlink_suspend_progress = 0;
|
||||
|
||||
/*
|
||||
* This callback is invoked when acquiring a RL_WRITER or RL_APPEND lock on
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
#define ZFS_KEY_MAX_SALT_USES_DEFAULT 400000000
|
||||
#define ZFS_CURRENT_MAX_SALT_USES \
|
||||
(MIN(zfs_key_max_salt_uses, ZFS_KEY_MAX_SALT_USES_DEFAULT))
|
||||
unsigned long zfs_key_max_salt_uses = ZFS_KEY_MAX_SALT_USES_DEFAULT;
|
||||
static unsigned long zfs_key_max_salt_uses = ZFS_KEY_MAX_SALT_USES_DEFAULT;
|
||||
|
||||
typedef struct blkptr_auth_buf {
|
||||
uint64_t bab_prop; /* blk_prop - portable mask */
|
||||
@@ -194,7 +194,7 @@ typedef struct blkptr_auth_buf {
|
||||
uint64_t bab_pad; /* reserved for future use */
|
||||
} blkptr_auth_buf_t;
|
||||
|
||||
zio_crypt_info_t zio_crypt_table[ZIO_CRYPT_FUNCTIONS] = {
|
||||
const zio_crypt_info_t zio_crypt_table[ZIO_CRYPT_FUNCTIONS] = {
|
||||
{"", ZC_TYPE_NONE, 0, "inherit"},
|
||||
{"", ZC_TYPE_NONE, 0, "on"},
|
||||
{"", ZC_TYPE_NONE, 0, "off"},
|
||||
|
||||
@@ -201,7 +201,7 @@ zpl_snapdir_revalidate(struct dentry *dentry, unsigned int flags)
|
||||
return (!!dentry->d_inode);
|
||||
}
|
||||
|
||||
dentry_operations_t zpl_dops_snapdirs = {
|
||||
static const dentry_operations_t zpl_dops_snapdirs = {
|
||||
/*
|
||||
* Auto mounting of snapshots is only supported for 2.6.37 and
|
||||
* newer kernels. Prior to this kernel the ops->follow_link()
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
* When using fallocate(2) to preallocate space, inflate the requested
|
||||
* capacity check by 10% to account for the required metadata blocks.
|
||||
*/
|
||||
unsigned int zfs_fallocate_reserve_percent = 110;
|
||||
static unsigned int zfs_fallocate_reserve_percent = 110;
|
||||
|
||||
static int
|
||||
zpl_open(struct inode *ip, struct file *filp)
|
||||
|
||||
@@ -746,7 +746,7 @@ __zpl_xattr_user_set(struct inode *ip, const char *name,
|
||||
}
|
||||
ZPL_XATTR_SET_WRAPPER(zpl_xattr_user_set);
|
||||
|
||||
xattr_handler_t zpl_xattr_user_handler =
|
||||
static xattr_handler_t zpl_xattr_user_handler =
|
||||
{
|
||||
.prefix = XATTR_USER_PREFIX,
|
||||
.list = zpl_xattr_user_list,
|
||||
@@ -815,8 +815,7 @@ __zpl_xattr_trusted_set(struct inode *ip, const char *name,
|
||||
}
|
||||
ZPL_XATTR_SET_WRAPPER(zpl_xattr_trusted_set);
|
||||
|
||||
xattr_handler_t zpl_xattr_trusted_handler =
|
||||
{
|
||||
static xattr_handler_t zpl_xattr_trusted_handler = {
|
||||
.prefix = XATTR_TRUSTED_PREFIX,
|
||||
.list = zpl_xattr_trusted_list,
|
||||
.get = zpl_xattr_trusted_get,
|
||||
@@ -910,7 +909,7 @@ zpl_xattr_security_init(struct inode *ip, struct inode *dip,
|
||||
/*
|
||||
* Security xattr namespace handlers.
|
||||
*/
|
||||
xattr_handler_t zpl_xattr_security_handler = {
|
||||
static xattr_handler_t zpl_xattr_security_handler = {
|
||||
.prefix = XATTR_SECURITY_PREFIX,
|
||||
.list = zpl_xattr_security_list,
|
||||
.get = zpl_xattr_security_get,
|
||||
@@ -1333,8 +1332,7 @@ ZPL_XATTR_SET_WRAPPER(zpl_xattr_acl_set_default);
|
||||
* Use .name instead of .prefix when available. xattr_resolve_name will match
|
||||
* whole name and reject anything that has .name only as prefix.
|
||||
*/
|
||||
xattr_handler_t zpl_xattr_acl_access_handler =
|
||||
{
|
||||
static xattr_handler_t zpl_xattr_acl_access_handler = {
|
||||
#ifdef HAVE_XATTR_HANDLER_NAME
|
||||
.name = XATTR_NAME_POSIX_ACL_ACCESS,
|
||||
#else
|
||||
@@ -1356,8 +1354,7 @@ xattr_handler_t zpl_xattr_acl_access_handler =
|
||||
* Use .name instead of .prefix when available. xattr_resolve_name will match
|
||||
* whole name and reject anything that has .name only as prefix.
|
||||
*/
|
||||
xattr_handler_t zpl_xattr_acl_default_handler =
|
||||
{
|
||||
static xattr_handler_t zpl_xattr_acl_default_handler = {
|
||||
#ifdef HAVE_XATTR_HANDLER_NAME
|
||||
.name = XATTR_NAME_POSIX_ACL_DEFAULT,
|
||||
#else
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user