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:
parent
7adc190098
commit
18168da727
|
@ -53,7 +53,6 @@
|
|||
#include <zfeature_common.h>
|
||||
#include <libzutil.h>
|
||||
|
||||
const char cmdname[] = "zhack";
|
||||
static importargs_t g_importargs;
|
||||
static char *g_pool;
|
||||
static boolean_t g_readonly;
|
||||
|
@ -62,9 +61,9 @@ static __attribute__((noreturn)) void
|
|||
usage(void)
|
||||
{
|
||||
(void) fprintf(stderr,
|
||||
"Usage: %s [-c cachefile] [-d dir] <subcommand> <args> ...\n"
|
||||
"Usage: zhack [-c cachefile] [-d dir] <subcommand> <args> ...\n"
|
||||
"where <subcommand> <args> is one of the following:\n"
|
||||
"\n", cmdname);
|
||||
"\n");
|
||||
|
||||
(void) fprintf(stderr,
|
||||
" feature stat <pool>\n"
|
||||
|
@ -99,10 +98,10 @@ fatal(spa_t *spa, void *tag, const char *fmt, ...)
|
|||
}
|
||||
|
||||
va_start(ap, fmt);
|
||||
(void) fprintf(stderr, "%s: ", cmdname);
|
||||
(void) fputs("zhack: ", stderr);
|
||||
(void) vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
(void) fprintf(stderr, "\n");
|
||||
(void) fputc('\n', stderr);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
@ -277,7 +276,7 @@ zhack_do_feature_enable(int argc, char **argv)
|
|||
spa_t *spa;
|
||||
objset_t *mos;
|
||||
zfeature_info_t feature;
|
||||
spa_feature_t nodeps[] = { SPA_FEATURE_NONE };
|
||||
const spa_feature_t nodeps[] = { SPA_FEATURE_NONE };
|
||||
|
||||
/*
|
||||
* Features are not added to the pool's label until their refcounts
|
||||
|
@ -374,7 +373,7 @@ zhack_do_feature_ref(int argc, char **argv)
|
|||
spa_t *spa;
|
||||
objset_t *mos;
|
||||
zfeature_info_t feature;
|
||||
spa_feature_t nodeps[] = { SPA_FEATURE_NONE };
|
||||
const spa_feature_t nodeps[] = { SPA_FEATURE_NONE };
|
||||
|
||||
/*
|
||||
* fi_desc does not matter here because it was written to disk
|
||||
|
|
|
@ -253,7 +253,7 @@ extern uint64_t metaslab_force_ganging;
|
|||
extern uint64_t metaslab_df_alloc_threshold;
|
||||
extern unsigned long zfs_deadman_synctime_ms;
|
||||
extern int metaslab_preload_limit;
|
||||
extern boolean_t zfs_compressed_arc_enabled;
|
||||
extern int zfs_compressed_arc_enabled;
|
||||
extern int zfs_abd_scatter_enabled;
|
||||
extern int dmu_object_alloc_chunk_shift;
|
||||
extern boolean_t zfs_force_some_double_word_sm_entries;
|
||||
|
|
|
@ -452,7 +452,7 @@ _LIBZFS_H void zpool_print_unsup_feat(nvlist_t *config);
|
|||
*/
|
||||
struct zfs_cmd;
|
||||
|
||||
_LIBZFS_H const char *zfs_history_event_names[];
|
||||
_LIBZFS_H const char *const zfs_history_event_names[];
|
||||
|
||||
typedef enum {
|
||||
VDEV_NAME_PATH = 1 << 0,
|
||||
|
|
|
@ -88,11 +88,11 @@ void crypto_mac_final(struct hmac_ctx *ctx, void *out_data,
|
|||
size_t out_data_size);
|
||||
|
||||
int freebsd_crypt_newsession(freebsd_crypt_session_t *sessp,
|
||||
struct zio_crypt_info *, crypto_key_t *);
|
||||
const struct zio_crypt_info *, crypto_key_t *);
|
||||
void freebsd_crypt_freesession(freebsd_crypt_session_t *sessp);
|
||||
|
||||
int freebsd_crypt_uio(boolean_t, freebsd_crypt_session_t *,
|
||||
struct zio_crypt_info *, zfs_uio_t *, crypto_key_t *, uint8_t *,
|
||||
const struct zio_crypt_info *, zfs_uio_t *, crypto_key_t *, uint8_t *,
|
||||
size_t, size_t);
|
||||
|
||||
#endif /* _ZFS_FREEBSD_CRYPTO_H */
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#define cond_resched() kern_yield(PRI_USER)
|
||||
|
||||
#define taskq_create_sysdc(a, b, d, e, p, dc, f) \
|
||||
(taskq_create(a, b, maxclsyspri, d, e, f))
|
||||
((void) sizeof (dc), taskq_create(a, b, maxclsyspri, d, e, f))
|
||||
|
||||
#define tsd_create(keyp, destructor) do { \
|
||||
*(keyp) = osd_thread_register((destructor)); \
|
||||
|
|
|
@ -175,8 +175,7 @@ extern void zfs_tstamp_update_setup_ext(struct znode *,
|
|||
uint_t, uint64_t [2], uint64_t [2], boolean_t have_tx);
|
||||
extern void zfs_znode_free(struct znode *);
|
||||
|
||||
extern zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE];
|
||||
extern int zfsfstype;
|
||||
extern zil_replay_func_t *const zfs_replay_vector[TX_MAX_TYPE];
|
||||
|
||||
extern int zfs_znode_parent_and_name(struct znode *zp, struct znode **dzpp,
|
||||
char *buf);
|
||||
|
|
|
@ -36,7 +36,8 @@ enum xdr_op {
|
|||
struct xdr_ops;
|
||||
|
||||
typedef struct {
|
||||
struct xdr_ops *x_ops; /* Let caller know xdrmem_create() succeeds */
|
||||
const struct xdr_ops *x_ops;
|
||||
/* Let caller know xdrmem_create() succeeds */
|
||||
caddr_t x_addr; /* Current buffer addr */
|
||||
caddr_t x_addr_end; /* End of the buffer */
|
||||
enum xdr_op x_op; /* Stream direction */
|
||||
|
|
|
@ -113,7 +113,6 @@
|
|||
#endif
|
||||
|
||||
/* Missing globals */
|
||||
extern char spl_gitrev[64];
|
||||
extern unsigned long spl_hostid;
|
||||
|
||||
/* Missing misc functions */
|
||||
|
|
|
@ -160,7 +160,8 @@ extern taskq_t *taskq_of_curthread(void);
|
|||
#define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \
|
||||
taskq_create(name, nthreads, pri, min, max, flags)
|
||||
#define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \
|
||||
taskq_create(name, nthreads, maxclsyspri, min, max, flags)
|
||||
((void) sizeof (dc), \
|
||||
taskq_create(name, nthreads, maxclsyspri, min, max, flags))
|
||||
|
||||
int spl_taskq_init(void);
|
||||
void spl_taskq_fini(void);
|
||||
|
|
|
@ -173,8 +173,7 @@ extern caddr_t zfs_map_page(page_t *, enum seg_rw);
|
|||
extern void zfs_unmap_page(page_t *, caddr_t);
|
||||
#endif /* HAVE_UIO_RW */
|
||||
|
||||
extern zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE];
|
||||
extern int zfsfstype;
|
||||
extern zil_replay_func_t *const zfs_replay_vector[TX_MAX_TYPE];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -99,7 +99,6 @@ extern const struct inode_operations zpl_ops_root;
|
|||
|
||||
extern const struct file_operations zpl_fops_snapdir;
|
||||
extern const struct inode_operations zpl_ops_snapdir;
|
||||
extern const struct dentry_operations zpl_dops_snapdirs;
|
||||
|
||||
extern const struct file_operations zpl_fops_shares;
|
||||
extern const struct inode_operations zpl_ops_shares;
|
||||
|
|
|
@ -58,7 +58,7 @@ typedef struct {
|
|||
*/
|
||||
|
||||
#define CRYPTO_MECH_INVALID ((uint64_t)-1)
|
||||
extern crypto_mech_type_t crypto_mech2id(char *name);
|
||||
extern crypto_mech_type_t crypto_mech2id(const char *name);
|
||||
|
||||
/*
|
||||
* Create and destroy context templates.
|
||||
|
|
|
@ -862,7 +862,6 @@ int dmu_assign_arcbuf_by_dnode(dnode_t *dn, uint64_t offset,
|
|||
int dmu_assign_arcbuf_by_dbuf(dmu_buf_t *handle, uint64_t offset,
|
||||
struct arc_buf *buf, dmu_tx_t *tx);
|
||||
#define dmu_assign_arcbuf dmu_assign_arcbuf_by_dbuf
|
||||
extern int zfs_prefetch_disable;
|
||||
extern int zfs_max_recordsize;
|
||||
|
||||
/*
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <sys/spa.h>
|
||||
#include <sys/objlist.h>
|
||||
|
||||
extern const char *recv_clone_name;
|
||||
extern const char *const recv_clone_name;
|
||||
|
||||
typedef struct dmu_recv_cookie {
|
||||
struct dsl_dataset *drc_ds;
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int zfs_allow_redacted_dataset_mount;
|
||||
struct dsl_dataset;
|
||||
struct dsl_dir;
|
||||
struct dsl_pool;
|
||||
|
@ -441,8 +440,8 @@ int dsl_dataset_set_compression(const char *dsname, zprop_source_t source,
|
|||
|
||||
boolean_t dsl_dataset_is_before(dsl_dataset_t *later, dsl_dataset_t *earlier,
|
||||
uint64_t earlier_txg);
|
||||
void dsl_dataset_long_hold(dsl_dataset_t *ds, void *tag);
|
||||
void dsl_dataset_long_rele(dsl_dataset_t *ds, void *tag);
|
||||
void dsl_dataset_long_hold(dsl_dataset_t *ds, const void *tag);
|
||||
void dsl_dataset_long_rele(dsl_dataset_t *ds, const void *tag);
|
||||
boolean_t dsl_dataset_long_held(dsl_dataset_t *ds);
|
||||
|
||||
int dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone,
|
||||
|
|
|
@ -60,7 +60,6 @@ struct dsl_deadlist;
|
|||
extern unsigned long zfs_dirty_data_max;
|
||||
extern unsigned long zfs_dirty_data_max_max;
|
||||
extern unsigned long zfs_wrlog_data_max;
|
||||
extern int zfs_dirty_data_sync_percent;
|
||||
extern int zfs_dirty_data_max_percent;
|
||||
extern int zfs_dirty_data_max_max_percent;
|
||||
extern int zfs_delay_min_dirty_percent;
|
||||
|
|
|
@ -206,7 +206,8 @@ typedef enum {
|
|||
ZFS_NUM_USERQUOTA_PROPS
|
||||
} zfs_userquota_prop_t;
|
||||
|
||||
_SYS_FS_ZFS_H const char *zfs_userquota_prop_prefixes[ZFS_NUM_USERQUOTA_PROPS];
|
||||
_SYS_FS_ZFS_H const char *const zfs_userquota_prop_prefixes[
|
||||
ZFS_NUM_USERQUOTA_PROPS];
|
||||
|
||||
/*
|
||||
* Pool properties are identified by these constants and must be added to the
|
||||
|
|
|
@ -43,7 +43,7 @@ typedef struct metaslab_ops {
|
|||
} metaslab_ops_t;
|
||||
|
||||
|
||||
extern metaslab_ops_t *zfs_metaslab_ops;
|
||||
extern const metaslab_ops_t zfs_metaslab_ops;
|
||||
|
||||
int metaslab_init(metaslab_group_t *, uint64_t, uint64_t, uint64_t,
|
||||
metaslab_t **);
|
||||
|
@ -101,7 +101,7 @@ void metaslab_stat_fini(void);
|
|||
void metaslab_trace_init(zio_alloc_list_t *);
|
||||
void metaslab_trace_fini(zio_alloc_list_t *);
|
||||
|
||||
metaslab_class_t *metaslab_class_create(spa_t *, metaslab_ops_t *);
|
||||
metaslab_class_t *metaslab_class_create(spa_t *, const metaslab_ops_t *);
|
||||
void metaslab_class_destroy(metaslab_class_t *);
|
||||
int metaslab_class_validate(metaslab_class_t *);
|
||||
void metaslab_class_histogram_verify(metaslab_class_t *);
|
||||
|
|
|
@ -179,7 +179,7 @@ typedef struct metaslab_class_allocator {
|
|||
struct metaslab_class {
|
||||
kmutex_t mc_lock;
|
||||
spa_t *mc_spa;
|
||||
metaslab_ops_t *mc_ops;
|
||||
const metaslab_ops_t *mc_ops;
|
||||
|
||||
/*
|
||||
* Track the number of metaslab groups that have been initialized
|
||||
|
|
|
@ -135,12 +135,12 @@ struct nv_alloc_ops {
|
|||
void (*nv_ao_reset)(nv_alloc_t *);
|
||||
};
|
||||
|
||||
_SYS_NVPAIR_H const nv_alloc_ops_t *nv_fixed_ops;
|
||||
_SYS_NVPAIR_H nv_alloc_t *nv_alloc_nosleep;
|
||||
_SYS_NVPAIR_H const nv_alloc_ops_t *const nv_fixed_ops;
|
||||
_SYS_NVPAIR_H nv_alloc_t *const nv_alloc_nosleep;
|
||||
|
||||
#if defined(_KERNEL)
|
||||
_SYS_NVPAIR_H nv_alloc_t *nv_alloc_sleep;
|
||||
_SYS_NVPAIR_H nv_alloc_t *nv_alloc_pushpage;
|
||||
_SYS_NVPAIR_H nv_alloc_t *const nv_alloc_sleep;
|
||||
_SYS_NVPAIR_H nv_alloc_t *const nv_alloc_pushpage;
|
||||
#endif
|
||||
|
||||
_SYS_NVPAIR_H int nv_alloc_init(nv_alloc_t *, const nv_alloc_ops_t *,
|
||||
|
|
|
@ -63,7 +63,7 @@ typedef struct range_tree {
|
|||
*/
|
||||
uint8_t rt_shift;
|
||||
uint64_t rt_start;
|
||||
range_tree_ops_t *rt_ops;
|
||||
const range_tree_ops_t *rt_ops;
|
||||
|
||||
/* rt_btree_compare should only be set if rt_arg is a b-tree */
|
||||
void *rt_arg;
|
||||
|
@ -278,11 +278,11 @@ rs_set_fill(range_seg_t *rs, range_tree_t *rt, uint64_t fill)
|
|||
|
||||
typedef void range_tree_func_t(void *arg, uint64_t start, uint64_t size);
|
||||
|
||||
range_tree_t *range_tree_create_impl(range_tree_ops_t *ops,
|
||||
range_tree_t *range_tree_create_impl(const range_tree_ops_t *ops,
|
||||
range_seg_type_t type, void *arg, uint64_t start, uint64_t shift,
|
||||
int (*zfs_btree_compare) (const void *, const void *), uint64_t gap);
|
||||
range_tree_t *range_tree_create(range_tree_ops_t *ops, range_seg_type_t type,
|
||||
void *arg, uint64_t start, uint64_t shift);
|
||||
range_tree_t *range_tree_create(const range_tree_ops_t *ops,
|
||||
range_seg_type_t type, void *arg, uint64_t start, uint64_t shift);
|
||||
void range_tree_destroy(range_tree_t *rt);
|
||||
boolean_t range_tree_contains(range_tree_t *rt, uint64_t start, uint64_t size);
|
||||
range_seg_t *range_tree_find(range_tree_t *rt, uint64_t start, uint64_t size);
|
||||
|
@ -321,7 +321,7 @@ void rt_btree_destroy(range_tree_t *rt, void *arg);
|
|||
void rt_btree_add(range_tree_t *rt, range_seg_t *rs, void *arg);
|
||||
void rt_btree_remove(range_tree_t *rt, range_seg_t *rs, void *arg);
|
||||
void rt_btree_vacate(range_tree_t *rt, void *arg);
|
||||
extern range_tree_ops_t rt_btree_ops;
|
||||
extern const range_tree_ops_t rt_btree_ops;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -143,7 +143,8 @@ uint64_t sa_handle_object(sa_handle_t *);
|
|||
boolean_t sa_attr_would_spill(sa_handle_t *, sa_attr_type_t, int size);
|
||||
void sa_spill_rele(sa_handle_t *);
|
||||
void sa_register_update_callback(objset_t *, sa_update_cb_t *);
|
||||
int sa_setup(objset_t *, uint64_t, sa_attr_reg_t *, int, sa_attr_type_t **);
|
||||
int sa_setup(objset_t *, uint64_t, const sa_attr_reg_t *, int,
|
||||
sa_attr_type_t **);
|
||||
void sa_tear_down(objset_t *);
|
||||
int sa_replace_all_by_template(sa_handle_t *, sa_bulk_attr_t *,
|
||||
int, dmu_tx_t *);
|
||||
|
|
|
@ -1208,6 +1208,9 @@ extern unsigned long zfs_deadman_synctime_ms;
|
|||
extern unsigned long zfs_deadman_ziotime_ms;
|
||||
extern unsigned long zfs_deadman_checktime_ms;
|
||||
|
||||
extern kmem_cache_t *zio_buf_cache[];
|
||||
extern kmem_cache_t *zio_data_buf_cache[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -444,7 +444,7 @@ struct spa {
|
|||
};
|
||||
|
||||
extern char *spa_config_path;
|
||||
extern char *zfs_deadman_failmode;
|
||||
extern const char *zfs_deadman_failmode;
|
||||
extern int spa_slop_shift;
|
||||
extern void spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_taskq_type_t q,
|
||||
task_func_t *func, void *arg, uint_t flags, taskq_ent_t *ent);
|
||||
|
|
|
@ -626,8 +626,6 @@ extern uint64_t vdev_get_ndisks(vdev_t *vd);
|
|||
* Global variables
|
||||
*/
|
||||
extern int zfs_vdev_standard_sm_blksz;
|
||||
/* zdb uses this tunable, so it must be declared here to make lint happy. */
|
||||
extern int zfs_vdev_cache_size;
|
||||
|
||||
/*
|
||||
* Functions from vdev_indirect.c
|
||||
|
|
|
@ -70,8 +70,8 @@ enum raidz_rec_op {
|
|||
RAIDZ_REC_NUM = 7
|
||||
};
|
||||
|
||||
extern const char *raidz_gen_name[RAIDZ_GEN_NUM];
|
||||
extern const char *raidz_rec_name[RAIDZ_REC_NUM];
|
||||
extern const char *const raidz_gen_name[RAIDZ_GEN_NUM];
|
||||
extern const char *const raidz_rec_name[RAIDZ_REC_NUM];
|
||||
|
||||
/*
|
||||
* Methods used to define raidz implementation
|
||||
|
|
|
@ -166,7 +166,7 @@ typedef struct zfs_acl {
|
|||
uint64_t z_hints; /* ACL hints (ZFS_INHERIT_ACE ...) */
|
||||
zfs_acl_node_t *z_curr_node; /* current node iterator is handling */
|
||||
list_t z_acl; /* chunks of ACE data */
|
||||
acl_ops_t *z_ops; /* ACL operations */
|
||||
const acl_ops_t *z_ops; /* ACL operations */
|
||||
} zfs_acl_t;
|
||||
|
||||
typedef struct acl_locator_cb {
|
||||
|
|
|
@ -492,7 +492,7 @@ extern taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t);
|
|||
#define taskq_create_proc(a, b, c, d, e, p, f) \
|
||||
(taskq_create(a, b, c, d, e, f))
|
||||
#define taskq_create_sysdc(a, b, d, e, p, dc, f) \
|
||||
(taskq_create(a, b, maxclsyspri, d, e, f))
|
||||
((void) sizeof (dc), taskq_create(a, b, maxclsyspri, d, e, f))
|
||||
extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t);
|
||||
extern taskqid_t taskq_dispatch_delay(taskq_t *, task_func_t, void *, uint_t,
|
||||
clock_t);
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#define _ZFS_IOCTL_IMPL_H_
|
||||
|
||||
extern kmutex_t zfsdev_state_lock;
|
||||
extern zfsdev_state_t *zfsdev_state_list;
|
||||
extern unsigned long zfs_max_nvlist_src_size;
|
||||
|
||||
typedef int zfs_ioc_legacy_func_t(zfs_cmd_t *);
|
||||
|
|
|
@ -91,8 +91,7 @@ typedef enum zpl_attr {
|
|||
#define SA_FLAGS_OFFSET 48
|
||||
#define SA_PROJID_OFFSET 128
|
||||
|
||||
extern sa_attr_reg_t zfs_attr_table[ZPL_END + 1];
|
||||
extern sa_attr_reg_t zfs_legacy_attr_table[ZPL_END + 1];
|
||||
extern const sa_attr_reg_t zfs_attr_table[ZPL_END + 1];
|
||||
|
||||
/*
|
||||
* This is a deprecated data structure that only exists for
|
||||
|
|
|
@ -456,8 +456,6 @@ typedef struct zil_stats {
|
|||
kstat_named_t zil_itx_metaslab_slog_bytes;
|
||||
} zil_stats_t;
|
||||
|
||||
extern zil_stats_t zil_stats;
|
||||
|
||||
#define ZIL_STAT_INCR(stat, val) \
|
||||
atomic_add_64(&zil_stats.stat.value.ui64, (val));
|
||||
#define ZIL_STAT_BUMP(stat) \
|
||||
|
@ -485,7 +483,7 @@ extern zilog_t *zil_open(objset_t *os, zil_get_data_t *get_data);
|
|||
extern void zil_close(zilog_t *zilog);
|
||||
|
||||
extern void zil_replay(objset_t *os, void *arg,
|
||||
zil_replay_func_t *replay_func[TX_MAX_TYPE]);
|
||||
zil_replay_func_t *const replay_func[TX_MAX_TYPE]);
|
||||
extern boolean_t zil_replaying(zilog_t *zilog, dmu_tx_t *tx);
|
||||
extern void zil_destroy(zilog_t *zilog, boolean_t keep_first);
|
||||
extern void zil_destroy_sync(zilog_t *zilog, dmu_tx_t *tx);
|
||||
|
|
|
@ -264,7 +264,7 @@ typedef void zio_done_func_t(zio_t *zio);
|
|||
|
||||
extern int zio_exclude_metadata;
|
||||
extern int zio_dva_throttle_enabled;
|
||||
extern const char *zio_type_name[ZIO_TYPES];
|
||||
extern const char *const zio_type_name[ZIO_TYPES];
|
||||
|
||||
/*
|
||||
* A bookmark is a four-tuple <objset, object, level, blkid> that uniquely
|
||||
|
|
|
@ -70,7 +70,7 @@ typedef struct zio_crypt_info {
|
|||
char *ci_name;
|
||||
} zio_crypt_info_t;
|
||||
|
||||
extern zio_crypt_info_t zio_crypt_table[ZIO_CRYPT_FUNCTIONS];
|
||||
extern const zio_crypt_info_t zio_crypt_table[ZIO_CRYPT_FUNCTIONS];
|
||||
|
||||
/* in memory representation of an unwrapped key that is loaded into memory */
|
||||
typedef struct zio_crypt_key {
|
||||
|
|
|
@ -61,12 +61,11 @@ typedef struct zvol_state {
|
|||
} zvol_state_t;
|
||||
|
||||
|
||||
extern list_t zvol_state_list;
|
||||
extern krwlock_t zvol_state_lock;
|
||||
#define ZVOL_HT_SIZE 1024
|
||||
extern struct hlist_head *zvol_htable;
|
||||
#define ZVOL_HT_HEAD(hash) (&zvol_htable[(hash) & (ZVOL_HT_SIZE-1)])
|
||||
extern zil_replay_func_t *zvol_replay_vector[TX_MAX_TYPE];
|
||||
extern zil_replay_func_t *const zvol_replay_vector[TX_MAX_TYPE];
|
||||
|
||||
extern unsigned int zvol_volmode;
|
||||
extern unsigned int zvol_inhibit_dev;
|
||||
|
|
|
@ -43,7 +43,7 @@ _ZFS_COMUTIL_H int zfs_spa_version_map(int zpl_version);
|
|||
_ZFS_COMUTIL_H boolean_t zfs_dataset_name_hidden(const char *);
|
||||
|
||||
#define ZFS_NUM_LEGACY_HISTORY_EVENTS 41
|
||||
_ZFS_COMUTIL_H const char *
|
||||
_ZFS_COMUTIL_H const char *const
|
||||
zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS];
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -85,7 +85,7 @@ typedef struct zfs_deleg_perm_tab {
|
|||
zfs_deleg_note_t z_note;
|
||||
} zfs_deleg_perm_tab_t;
|
||||
|
||||
_ZFS_DELEG_H zfs_deleg_perm_tab_t zfs_deleg_perm_tab[];
|
||||
_ZFS_DELEG_H const zfs_deleg_perm_tab_t zfs_deleg_perm_tab[];
|
||||
|
||||
_ZFS_DELEG_H int zfs_deleg_verify_nvlist(nvlist_t *nvlist);
|
||||
_ZFS_DELEG_H void zfs_deleg_whokey(char *attr, zfs_deleg_who_type_t type,
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<dependency name='libc.so.6'/>
|
||||
</elf-needed>
|
||||
<elf-function-symbols>
|
||||
<elf-symbol name='_fini' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='_init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='dump_nvlist' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='fnvlist_add_boolean' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='fnvlist_add_boolean_array' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
|
@ -1332,7 +1330,8 @@
|
|||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='../../module/nvpair/nvpair_alloc_fixed.c' language='LANG_C99'>
|
||||
<var-decl name='nv_fixed_ops' type-id='ee1d4944' mangled-name='nv_fixed_ops' visibility='default' elf-symbol-id='nv_fixed_ops'/>
|
||||
<qualified-type-def type-id='ee1d4944' const='yes' id='4b95388f'/>
|
||||
<var-decl name='nv_fixed_ops' type-id='4b95388f' mangled-name='nv_fixed_ops' visibility='default' elf-symbol-id='nv_fixed_ops'/>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='libnvpair.c' language='LANG_C99'>
|
||||
<type-decl name='char' size-in-bits='8' id='a84c031d'/>
|
||||
|
@ -1342,6 +1341,10 @@
|
|||
<array-type-def dimensions='1' type-id='a84c031d' size-in-bits='160' id='664ac0b7'>
|
||||
<subrange length='20' type-id='7359adad' id='fdca39cf'/>
|
||||
</array-type-def>
|
||||
<class-decl name='_IO_codecvt' is-struct='yes' visibility='default' is-declaration-only='yes' id='a4036571'/>
|
||||
<class-decl name='_IO_marker' is-struct='yes' visibility='default' is-declaration-only='yes' id='010ae0b9'/>
|
||||
<class-decl name='_IO_wide_data' is-struct='yes' visibility='default' is-declaration-only='yes' id='79bd3751'/>
|
||||
<class-decl name='re_dfa_t' is-struct='yes' visibility='default' is-declaration-only='yes' id='b48d2441'/>
|
||||
<type-decl name='double' size-in-bits='64' id='a0eb0f08'/>
|
||||
<type-decl name='int' size-in-bits='32' id='95e97e5e'/>
|
||||
<type-decl name='long int' size-in-bits='64' id='bd54fe1a'/>
|
||||
|
@ -1354,6 +1357,7 @@
|
|||
<type-decl name='unsigned long int' size-in-bits='64' id='7359adad'/>
|
||||
<type-decl name='unsigned short int' size-in-bits='16' id='8efea9e5'/>
|
||||
<type-decl name='variadic parameter type' id='2c1145c5'/>
|
||||
<type-decl name='void' id='48b5725f'/>
|
||||
<typedef-decl name='nvlist_prtctl_t' type-id='196db161' id='b0c1ff8d'/>
|
||||
<enum-decl name='nvlist_indent_mode' id='628aafab'>
|
||||
<underlying-type type-id='9cac1fee'/>
|
||||
|
@ -1775,16 +1779,17 @@
|
|||
<var-decl name='nvprt_custops' type-id='7be54adb' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__re_long_size_t' type-id='7359adad' id='ba516949'/>
|
||||
<typedef-decl name='reg_syntax_t' type-id='7359adad' id='1b72c3b3'/>
|
||||
<class-decl name='re_pattern_buffer' size-in-bits='512' is-struct='yes' visibility='default' id='19fc9a8c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='buffer' type-id='cf536864' visibility='default'/>
|
||||
<var-decl name='buffer' type-id='33976309' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='allocated' type-id='7359adad' visibility='default'/>
|
||||
<var-decl name='allocated' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='used' type-id='7359adad' visibility='default'/>
|
||||
<var-decl name='used' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='syntax' type-id='1b72c3b3' visibility='default'/>
|
||||
|
@ -1821,18 +1826,26 @@
|
|||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='regex_t' type-id='19fc9a8c' id='aca3bac8'/>
|
||||
<typedef-decl name='int8_t' type-id='2171a512' id='ee31ee44'/>
|
||||
<typedef-decl name='int16_t' type-id='03896e23' id='23bd8cb5'/>
|
||||
<typedef-decl name='int32_t' type-id='33f57a65' id='3ff5601b'/>
|
||||
<typedef-decl name='int64_t' type-id='0c9942d2' id='9da381c4'/>
|
||||
<typedef-decl name='uint8_t' type-id='c51d6389' id='b96825af'/>
|
||||
<typedef-decl name='uint16_t' type-id='253c2d2a' id='149c6638'/>
|
||||
<typedef-decl name='uint32_t' type-id='62f1140c' id='8f92235e'/>
|
||||
<typedef-decl name='uint64_t' type-id='8910171f' id='9c313c2d'/>
|
||||
<typedef-decl name='__int8_t' type-id='28577a57' id='2171a512'/>
|
||||
<typedef-decl name='__uint8_t' type-id='002ac4a6' id='c51d6389'/>
|
||||
<typedef-decl name='__int16_t' type-id='a2185560' id='03896e23'/>
|
||||
<typedef-decl name='__uint16_t' type-id='8efea9e5' id='253c2d2a'/>
|
||||
<typedef-decl name='__int32_t' type-id='95e97e5e' id='33f57a65'/>
|
||||
<typedef-decl name='__uint32_t' type-id='f0981eeb' id='62f1140c'/>
|
||||
<typedef-decl name='__int64_t' type-id='bd54fe1a' id='0c9942d2'/>
|
||||
<typedef-decl name='__uint64_t' type-id='7359adad' id='8910171f'/>
|
||||
<typedef-decl name='__off_t' type-id='bd54fe1a' id='79989e9c'/>
|
||||
<typedef-decl name='__off64_t' type-id='bd54fe1a' id='724e4de6'/>
|
||||
<typedef-decl name='FILE' type-id='ec1ed955' id='aa12d1ba'/>
|
||||
<typedef-decl name='_IO_lock_t' type-id='48b5725f' id='bb4788fa'/>
|
||||
<class-decl name='_IO_marker' size-in-bits='192' is-struct='yes' visibility='default' id='010ae0b9'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='_next' type-id='e4c6fa61' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='_sbuf' type-id='dca988a5' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='_pos' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='_IO_FILE' size-in-bits='1728' is-struct='yes' visibility='default' id='ec1ed955'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='_flags' type-id='95e97e5e' visibility='default'/>
|
||||
|
@ -1901,16 +1914,16 @@
|
|||
<var-decl name='_offset' type-id='724e4de6' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1216'>
|
||||
<var-decl name='__pad1' type-id='eaa32e2f' visibility='default'/>
|
||||
<var-decl name='_codecvt' type-id='570f8c59' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1280'>
|
||||
<var-decl name='__pad2' type-id='eaa32e2f' visibility='default'/>
|
||||
<var-decl name='_wide_data' type-id='c65a1f29' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1344'>
|
||||
<var-decl name='__pad3' type-id='eaa32e2f' visibility='default'/>
|
||||
<var-decl name='_freeres_list' type-id='dca988a5' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1408'>
|
||||
<var-decl name='__pad4' type-id='eaa32e2f' visibility='default'/>
|
||||
<var-decl name='_freeres_buf' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1472'>
|
||||
<var-decl name='__pad5' type-id='b59d7dce' visibility='default'/>
|
||||
|
@ -1922,30 +1935,13 @@
|
|||
<var-decl name='_unused2' type-id='664ac0b7' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='int8_t' type-id='2171a512' id='ee31ee44'/>
|
||||
<typedef-decl name='int16_t' type-id='03896e23' id='23bd8cb5'/>
|
||||
<typedef-decl name='int32_t' type-id='33f57a65' id='3ff5601b'/>
|
||||
<typedef-decl name='int64_t' type-id='0c9942d2' id='9da381c4'/>
|
||||
<typedef-decl name='uint8_t' type-id='c51d6389' id='b96825af'/>
|
||||
<typedef-decl name='uint16_t' type-id='253c2d2a' id='149c6638'/>
|
||||
<typedef-decl name='uint32_t' type-id='62f1140c' id='8f92235e'/>
|
||||
<typedef-decl name='uint64_t' type-id='8910171f' id='9c313c2d'/>
|
||||
<typedef-decl name='__int8_t' type-id='28577a57' id='2171a512'/>
|
||||
<typedef-decl name='__uint8_t' type-id='002ac4a6' id='c51d6389'/>
|
||||
<typedef-decl name='__int16_t' type-id='a2185560' id='03896e23'/>
|
||||
<typedef-decl name='__uint16_t' type-id='8efea9e5' id='253c2d2a'/>
|
||||
<typedef-decl name='__int32_t' type-id='95e97e5e' id='33f57a65'/>
|
||||
<typedef-decl name='__uint32_t' type-id='f0981eeb' id='62f1140c'/>
|
||||
<typedef-decl name='__int64_t' type-id='bd54fe1a' id='0c9942d2'/>
|
||||
<typedef-decl name='__uint64_t' type-id='7359adad' id='8910171f'/>
|
||||
<typedef-decl name='__off_t' type-id='bd54fe1a' id='79989e9c'/>
|
||||
<typedef-decl name='__off64_t' type-id='bd54fe1a' id='724e4de6'/>
|
||||
<typedef-decl name='FILE' type-id='ec1ed955' id='aa12d1ba'/>
|
||||
<typedef-decl name='size_t' type-id='7359adad' id='b59d7dce'/>
|
||||
<pointer-type-def type-id='aa12d1ba' size-in-bits='64' id='822cd80b'/>
|
||||
<pointer-type-def type-id='ec1ed955' size-in-bits='64' id='dca988a5'/>
|
||||
<pointer-type-def type-id='a4036571' size-in-bits='64' id='570f8c59'/>
|
||||
<pointer-type-def type-id='bb4788fa' size-in-bits='64' id='cecf4ea7'/>
|
||||
<pointer-type-def type-id='010ae0b9' size-in-bits='64' id='e4c6fa61'/>
|
||||
<pointer-type-def type-id='79bd3751' size-in-bits='64' id='c65a1f29'/>
|
||||
<pointer-type-def type-id='c19b74c3' size-in-bits='64' id='37e3bd22'/>
|
||||
<pointer-type-def type-id='a84c031d' size-in-bits='64' id='26a90f95'/>
|
||||
<pointer-type-def type-id='26a90f95' size-in-bits='64' id='9b23c9ad'/>
|
||||
|
@ -2014,6 +2010,7 @@
|
|||
<pointer-type-def type-id='8e8d4be3' size-in-bits='64' id='5ce45b60'/>
|
||||
<pointer-type-def type-id='5ce45b60' size-in-bits='64' id='857bb57e'/>
|
||||
<pointer-type-def type-id='57928edf' size-in-bits='64' id='3fa542f0'/>
|
||||
<pointer-type-def type-id='b48d2441' size-in-bits='64' id='33976309'/>
|
||||
<pointer-type-def type-id='aca3bac8' size-in-bits='64' id='d33f11cb'/>
|
||||
<pointer-type-def type-id='d8bf0010' size-in-bits='64' id='45b65157'/>
|
||||
<pointer-type-def type-id='149c6638' size-in-bits='64' id='8a121f49'/>
|
||||
|
@ -2022,6 +2019,10 @@
|
|||
<pointer-type-def type-id='b96825af' size-in-bits='64' id='ae3e8ca6'/>
|
||||
<pointer-type-def type-id='002ac4a6' size-in-bits='64' id='cf536864'/>
|
||||
<pointer-type-def type-id='48b5725f' size-in-bits='64' id='eaa32e2f'/>
|
||||
<class-decl name='_IO_codecvt' is-struct='yes' visibility='default' is-declaration-only='yes' id='a4036571'/>
|
||||
<class-decl name='_IO_marker' is-struct='yes' visibility='default' is-declaration-only='yes' id='010ae0b9'/>
|
||||
<class-decl name='_IO_wide_data' is-struct='yes' visibility='default' is-declaration-only='yes' id='79bd3751'/>
|
||||
<class-decl name='re_dfa_t' is-struct='yes' visibility='default' is-declaration-only='yes' id='b48d2441'/>
|
||||
<function-decl name='nvlist_prtctl_setdest' mangled-name='nvlist_prtctl_setdest' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='nvlist_prtctl_setdest'>
|
||||
<parameter type-id='b0c1ff8d' name='pctl'/>
|
||||
<parameter type-id='822cd80b' name='fp'/>
|
||||
|
@ -2710,7 +2711,6 @@
|
|||
<parameter type-id='3502e3ff'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-type>
|
||||
<type-decl name='void' id='48b5725f'/>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='libnvpair_json.c' language='LANG_C99'>
|
||||
<function-decl name='nvlist_print_json' mangled-name='nvlist_print_json' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='nvlist_print_json'>
|
||||
|
@ -2766,10 +2766,11 @@
|
|||
<pointer-type-def type-id='aca16c06' size-in-bits='64' id='ee1d4944'/>
|
||||
<pointer-type-def type-id='e9ff7293' size-in-bits='64' id='76da8447'/>
|
||||
<pointer-type-def type-id='cca08635' size-in-bits='64' id='11871392'/>
|
||||
<qualified-type-def type-id='11871392' const='yes' id='e1cbfe1d'/>
|
||||
<pointer-type-def type-id='51a21b4b' size-in-bits='64' id='fe356f6f'/>
|
||||
<pointer-type-def type-id='1169c032' size-in-bits='64' id='520da3f4'/>
|
||||
<pointer-type-def type-id='9fff962e' size-in-bits='64' id='9ff7f508'/>
|
||||
<var-decl name='nv_alloc_nosleep' type-id='11871392' mangled-name='nv_alloc_nosleep' visibility='default' elf-symbol-id='nv_alloc_nosleep'/>
|
||||
<var-decl name='nv_alloc_nosleep' type-id='e1cbfe1d' mangled-name='nv_alloc_nosleep' visibility='default' elf-symbol-id='nv_alloc_nosleep'/>
|
||||
<function-type size-in-bits='64' id='e9ff7293'>
|
||||
<parameter type-id='11871392'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
|
|
|
@ -51,15 +51,15 @@ static const nv_alloc_ops_t system_ops = {
|
|||
NULL /* nv_ao_reset() */
|
||||
};
|
||||
|
||||
nv_alloc_t nv_alloc_sleep_def = {
|
||||
static nv_alloc_t nv_alloc_sleep_def = {
|
||||
&system_ops,
|
||||
(void *)KM_SLEEP
|
||||
};
|
||||
|
||||
nv_alloc_t nv_alloc_nosleep_def = {
|
||||
static nv_alloc_t nv_alloc_nosleep_def = {
|
||||
&system_ops,
|
||||
(void *)KM_NOSLEEP
|
||||
};
|
||||
|
||||
nv_alloc_t *nv_alloc_sleep = &nv_alloc_sleep_def;
|
||||
nv_alloc_t *nv_alloc_nosleep = &nv_alloc_nosleep_def;
|
||||
nv_alloc_t *const nv_alloc_sleep = &nv_alloc_sleep_def;
|
||||
nv_alloc_t *const nv_alloc_nosleep = &nv_alloc_nosleep_def;
|
||||
|
|
|
@ -129,9 +129,9 @@ umem_zalloc(size_t size, int flags)
|
|||
}
|
||||
|
||||
static inline void
|
||||
umem_free(void *ptr, size_t size __maybe_unused)
|
||||
umem_free(const void *ptr, size_t size __maybe_unused)
|
||||
{
|
||||
free(ptr);
|
||||
free((void *)ptr);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
@ -10,14 +10,11 @@
|
|||
<dependency name='libm.so.6'/>
|
||||
<dependency name='libcrypto.so.1.1'/>
|
||||
<dependency name='libz.so.1'/>
|
||||
<dependency name='libdl.so.2'/>
|
||||
<dependency name='libpthread.so.0'/>
|
||||
<dependency name='libc.so.6'/>
|
||||
<dependency name='ld-linux-x86-64.so.2'/>
|
||||
</elf-needed>
|
||||
<elf-function-symbols>
|
||||
<elf-symbol name='_fini' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='_init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='_sol_getmntent' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='atomic_add_16' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='atomic_add_16_nv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
|
@ -1401,6 +1398,9 @@
|
|||
<array-type-def dimensions='1' type-id='a84c031d' size-in-bits='160' id='664ac0b7'>
|
||||
<subrange length='20' type-id='7359adad' id='fdca39cf'/>
|
||||
</array-type-def>
|
||||
<class-decl name='_IO_codecvt' is-struct='yes' visibility='default' is-declaration-only='yes' id='a4036571'/>
|
||||
<class-decl name='_IO_marker' is-struct='yes' visibility='default' is-declaration-only='yes' id='010ae0b9'/>
|
||||
<class-decl name='_IO_wide_data' is-struct='yes' visibility='default' is-declaration-only='yes' id='79bd3751'/>
|
||||
<class-decl name='extmnttab' size-in-bits='320' is-struct='yes' visibility='default' id='0c544dc0'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='mnt_special' type-id='26a90f95' visibility='default'/>
|
||||
|
@ -1421,18 +1421,66 @@
|
|||
<var-decl name='mnt_minor' type-id='3502e3ff' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='_IO_lock_t' type-id='48b5725f' id='bb4788fa'/>
|
||||
<class-decl name='_IO_marker' size-in-bits='192' is-struct='yes' visibility='default' id='010ae0b9'>
|
||||
<class-decl name='stat64' size-in-bits='1152' is-struct='yes' visibility='default' id='0bbec9cd'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='_next' type-id='e4c6fa61' visibility='default'/>
|
||||
<var-decl name='st_dev' type-id='35ed8932' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='_sbuf' type-id='dca988a5' visibility='default'/>
|
||||
<var-decl name='st_ino' type-id='71288a47' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='_pos' type-id='95e97e5e' visibility='default'/>
|
||||
<var-decl name='st_nlink' type-id='80f0b9df' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='st_mode' type-id='e1c52942' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='224'>
|
||||
<var-decl name='st_uid' type-id='cc5fcceb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='st_gid' type-id='d94ec6d9' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='288'>
|
||||
<var-decl name='__pad0' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='320'>
|
||||
<var-decl name='st_rdev' type-id='35ed8932' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='384'>
|
||||
<var-decl name='st_size' type-id='79989e9c' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='448'>
|
||||
<var-decl name='st_blksize' type-id='d3f10a7f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='512'>
|
||||
<var-decl name='st_blocks' type-id='4e711bf1' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='576'>
|
||||
<var-decl name='st_atim' type-id='a9c79a1f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='704'>
|
||||
<var-decl name='st_mtim' type-id='a9c79a1f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='832'>
|
||||
<var-decl name='st_ctim' type-id='a9c79a1f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='960'>
|
||||
<var-decl name='__glibc_reserved' type-id='083f8d58' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__dev_t' type-id='7359adad' id='35ed8932'/>
|
||||
<typedef-decl name='__gid_t' type-id='f0981eeb' id='d94ec6d9'/>
|
||||
<typedef-decl name='__ino64_t' type-id='7359adad' id='71288a47'/>
|
||||
<typedef-decl name='__mode_t' type-id='f0981eeb' id='e1c52942'/>
|
||||
<typedef-decl name='__nlink_t' type-id='7359adad' id='80f0b9df'/>
|
||||
<typedef-decl name='__off_t' type-id='bd54fe1a' id='79989e9c'/>
|
||||
<typedef-decl name='__off64_t' type-id='bd54fe1a' id='724e4de6'/>
|
||||
<typedef-decl name='__time_t' type-id='bd54fe1a' id='65eda9c0'/>
|
||||
<typedef-decl name='__blksize_t' type-id='bd54fe1a' id='d3f10a7f'/>
|
||||
<typedef-decl name='__blkcnt64_t' type-id='bd54fe1a' id='4e711bf1'/>
|
||||
<typedef-decl name='__syscall_slong_t' type-id='bd54fe1a' id='03085adc'/>
|
||||
<typedef-decl name='FILE' type-id='ec1ed955' id='aa12d1ba'/>
|
||||
<typedef-decl name='_IO_lock_t' type-id='48b5725f' id='bb4788fa'/>
|
||||
<class-decl name='_IO_FILE' size-in-bits='1728' is-struct='yes' visibility='default' id='ec1ed955'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='_flags' type-id='95e97e5e' visibility='default'/>
|
||||
|
@ -1501,16 +1549,16 @@
|
|||
<var-decl name='_offset' type-id='724e4de6' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1216'>
|
||||
<var-decl name='__pad1' type-id='eaa32e2f' visibility='default'/>
|
||||
<var-decl name='_codecvt' type-id='570f8c59' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1280'>
|
||||
<var-decl name='__pad2' type-id='eaa32e2f' visibility='default'/>
|
||||
<var-decl name='_wide_data' type-id='c65a1f29' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1344'>
|
||||
<var-decl name='__pad3' type-id='eaa32e2f' visibility='default'/>
|
||||
<var-decl name='_freeres_list' type-id='dca988a5' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1408'>
|
||||
<var-decl name='__pad4' type-id='eaa32e2f' visibility='default'/>
|
||||
<var-decl name='_freeres_buf' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1472'>
|
||||
<var-decl name='__pad5' type-id='b59d7dce' visibility='default'/>
|
||||
|
@ -1522,65 +1570,6 @@
|
|||
<var-decl name='_unused2' type-id='664ac0b7' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='stat64' size-in-bits='1152' is-struct='yes' visibility='default' id='0bbec9cd'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='st_dev' type-id='35ed8932' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='st_ino' type-id='71288a47' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='st_nlink' type-id='80f0b9df' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='st_mode' type-id='e1c52942' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='224'>
|
||||
<var-decl name='st_uid' type-id='cc5fcceb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='st_gid' type-id='d94ec6d9' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='288'>
|
||||
<var-decl name='__pad0' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='320'>
|
||||
<var-decl name='st_rdev' type-id='35ed8932' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='384'>
|
||||
<var-decl name='st_size' type-id='79989e9c' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='448'>
|
||||
<var-decl name='st_blksize' type-id='d3f10a7f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='512'>
|
||||
<var-decl name='st_blocks' type-id='4e711bf1' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='576'>
|
||||
<var-decl name='st_atim' type-id='a9c79a1f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='704'>
|
||||
<var-decl name='st_mtim' type-id='a9c79a1f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='832'>
|
||||
<var-decl name='st_ctim' type-id='a9c79a1f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='960'>
|
||||
<var-decl name='__glibc_reserved' type-id='083f8d58' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__dev_t' type-id='7359adad' id='35ed8932'/>
|
||||
<typedef-decl name='__gid_t' type-id='f0981eeb' id='d94ec6d9'/>
|
||||
<typedef-decl name='__ino64_t' type-id='7359adad' id='71288a47'/>
|
||||
<typedef-decl name='__mode_t' type-id='f0981eeb' id='e1c52942'/>
|
||||
<typedef-decl name='__nlink_t' type-id='7359adad' id='80f0b9df'/>
|
||||
<typedef-decl name='__off_t' type-id='bd54fe1a' id='79989e9c'/>
|
||||
<typedef-decl name='__off64_t' type-id='bd54fe1a' id='724e4de6'/>
|
||||
<typedef-decl name='__time_t' type-id='bd54fe1a' id='65eda9c0'/>
|
||||
<typedef-decl name='__blksize_t' type-id='bd54fe1a' id='d3f10a7f'/>
|
||||
<typedef-decl name='__blkcnt64_t' type-id='bd54fe1a' id='4e711bf1'/>
|
||||
<typedef-decl name='__syscall_slong_t' type-id='bd54fe1a' id='03085adc'/>
|
||||
<typedef-decl name='FILE' type-id='ec1ed955' id='aa12d1ba'/>
|
||||
<class-decl name='timespec' size-in-bits='128' is-struct='yes' visibility='default' id='a9c79a1f'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='tv_sec' type-id='65eda9c0' visibility='default'/>
|
||||
|
@ -1591,10 +1580,15 @@
|
|||
</class-decl>
|
||||
<pointer-type-def type-id='aa12d1ba' size-in-bits='64' id='822cd80b'/>
|
||||
<pointer-type-def type-id='ec1ed955' size-in-bits='64' id='dca988a5'/>
|
||||
<pointer-type-def type-id='a4036571' size-in-bits='64' id='570f8c59'/>
|
||||
<pointer-type-def type-id='bb4788fa' size-in-bits='64' id='cecf4ea7'/>
|
||||
<pointer-type-def type-id='010ae0b9' size-in-bits='64' id='e4c6fa61'/>
|
||||
<pointer-type-def type-id='79bd3751' size-in-bits='64' id='c65a1f29'/>
|
||||
<pointer-type-def type-id='0c544dc0' size-in-bits='64' id='394fc496'/>
|
||||
<pointer-type-def type-id='0bbec9cd' size-in-bits='64' id='62f7a03d'/>
|
||||
<class-decl name='_IO_codecvt' is-struct='yes' visibility='default' is-declaration-only='yes' id='a4036571'/>
|
||||
<class-decl name='_IO_marker' is-struct='yes' visibility='default' is-declaration-only='yes' id='010ae0b9'/>
|
||||
<class-decl name='_IO_wide_data' is-struct='yes' visibility='default' is-declaration-only='yes' id='79bd3751'/>
|
||||
<function-decl name='getmntany' mangled-name='getmntany' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='getmntany'>
|
||||
<parameter type-id='822cd80b' name='fp'/>
|
||||
<parameter type-id='9d424d31' name='mgetp'/>
|
||||
|
@ -1996,7 +1990,7 @@
|
|||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='../../module/zcommon/zfs_comutil.c' language='LANG_C99'>
|
||||
<array-type-def dimensions='1' type-id='80f4b756' size-in-bits='2624' id='ef31fedf'>
|
||||
<array-type-def dimensions='1' type-id='b99c00c9' size-in-bits='2624' id='5ce15418'>
|
||||
<subrange length='41' type-id='7359adad' id='cb834f44'/>
|
||||
</array-type-def>
|
||||
<class-decl name='zpool_load_policy' size-in-bits='256' is-struct='yes' visibility='default' id='2f65b36f'>
|
||||
|
@ -2014,8 +2008,9 @@
|
|||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='zpool_load_policy_t' type-id='2f65b36f' id='d11b7617'/>
|
||||
<qualified-type-def type-id='80f4b756' const='yes' id='b99c00c9'/>
|
||||
<pointer-type-def type-id='d11b7617' size-in-bits='64' id='23432aaa'/>
|
||||
<var-decl name='zfs_history_event_names' type-id='ef31fedf' mangled-name='zfs_history_event_names' visibility='default' elf-symbol-id='zfs_history_event_names'/>
|
||||
<var-decl name='zfs_history_event_names' type-id='5ce15418' mangled-name='zfs_history_event_names' visibility='default' elf-symbol-id='zfs_history_event_names'/>
|
||||
<function-decl name='zfs_allocatable_devs' mangled-name='zfs_allocatable_devs' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_allocatable_devs'>
|
||||
<parameter type-id='5ce45b60' name='nv'/>
|
||||
<return type-id='c19b74c3'/>
|
||||
|
@ -2044,7 +2039,7 @@
|
|||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='../../module/zcommon/zfs_deleg.c' language='LANG_C99'>
|
||||
<array-type-def dimensions='1' type-id='f3f851ad' size-in-bits='infinite' id='bc4e5d90'>
|
||||
<array-type-def dimensions='1' type-id='fa1870fd' size-in-bits='infinite' id='7c00e69d'>
|
||||
<subrange length='infinite' id='031f2035'/>
|
||||
</array-type-def>
|
||||
<enum-decl name='zfs_deleg_who_type_t' naming-typedef-id='36d4bd5a' id='b5fa5816'>
|
||||
|
@ -2107,7 +2102,8 @@
|
|||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='zfs_deleg_perm_tab_t' type-id='5aa05c1f' id='f3f851ad'/>
|
||||
<var-decl name='zfs_deleg_perm_tab' type-id='bc4e5d90' mangled-name='zfs_deleg_perm_tab' visibility='default' elf-symbol-id='zfs_deleg_perm_tab'/>
|
||||
<qualified-type-def type-id='f3f851ad' const='yes' id='fa1870fd'/>
|
||||
<var-decl name='zfs_deleg_perm_tab' type-id='7c00e69d' mangled-name='zfs_deleg_perm_tab' visibility='default' elf-symbol-id='zfs_deleg_perm_tab'/>
|
||||
<function-decl name='zfs_deleg_canonicalize_perm' mangled-name='zfs_deleg_canonicalize_perm' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_deleg_canonicalize_perm'>
|
||||
<parameter type-id='80f4b756' name='perm'/>
|
||||
<return type-id='80f4b756'/>
|
||||
|
@ -2465,7 +2461,7 @@
|
|||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='../../module/zcommon/zfs_prop.c' language='LANG_C99'>
|
||||
<array-type-def dimensions='1' type-id='80f4b756' size-in-bits='768' id='35e4b367'>
|
||||
<array-type-def dimensions='1' type-id='b99c00c9' size-in-bits='768' id='bcc77e38'>
|
||||
<subrange length='12' type-id='7359adad' id='84827bdc'/>
|
||||
</array-type-def>
|
||||
<enum-decl name='zprop_type_t' naming-typedef-id='31429eff' id='87676253'>
|
||||
|
@ -2542,7 +2538,7 @@
|
|||
<qualified-type-def type-id='64636ce3' const='yes' id='072f7953'/>
|
||||
<pointer-type-def type-id='072f7953' size-in-bits='64' id='c8bc397b'/>
|
||||
<pointer-type-def type-id='ffa52b96' size-in-bits='64' id='76c8174b'/>
|
||||
<var-decl name='zfs_userquota_prop_prefixes' type-id='35e4b367' mangled-name='zfs_userquota_prop_prefixes' visibility='default' elf-symbol-id='zfs_userquota_prop_prefixes'/>
|
||||
<var-decl name='zfs_userquota_prop_prefixes' type-id='bcc77e38' mangled-name='zfs_userquota_prop_prefixes' visibility='default' elf-symbol-id='zfs_userquota_prop_prefixes'/>
|
||||
<function-decl name='zfs_prop_get_table' mangled-name='zfs_prop_get_table' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_prop_get_table'>
|
||||
<return type-id='76c8174b'/>
|
||||
</function-decl>
|
||||
|
@ -2923,6 +2919,9 @@
|
|||
<array-type-def dimensions='1' type-id='a84c031d' size-in-bits='320' id='36c46961'>
|
||||
<subrange length='40' type-id='7359adad' id='8f80b239'/>
|
||||
</array-type-def>
|
||||
<class-decl name='re_dfa_t' is-struct='yes' visibility='default' is-declaration-only='yes' id='b48d2441'/>
|
||||
<class-decl name='uu_avl' is-struct='yes' visibility='default' is-declaration-only='yes' id='4af029d1'/>
|
||||
<class-decl name='uu_avl_pool' is-struct='yes' visibility='default' is-declaration-only='yes' id='12a530a8'/>
|
||||
<type-decl name='int' size-in-bits='32' id='95e97e5e'/>
|
||||
<type-decl name='long int' size-in-bits='64' id='bd54fe1a'/>
|
||||
<type-decl name='long long int' size-in-bits='64' id='1eb56b1e'/>
|
||||
|
@ -3165,16 +3164,17 @@
|
|||
<var-decl name='zpool_start_block' type-id='804dc465' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__re_long_size_t' type-id='7359adad' id='ba516949'/>
|
||||
<typedef-decl name='reg_syntax_t' type-id='7359adad' id='1b72c3b3'/>
|
||||
<class-decl name='re_pattern_buffer' size-in-bits='512' is-struct='yes' visibility='default' id='19fc9a8c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='buffer' type-id='cf536864' visibility='default'/>
|
||||
<var-decl name='buffer' type-id='33976309' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='allocated' type-id='7359adad' visibility='default'/>
|
||||
<var-decl name='allocated' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='used' type-id='7359adad' visibility='default'/>
|
||||
<var-decl name='used' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='syntax' type-id='1b72c3b3' visibility='default'/>
|
||||
|
@ -3228,15 +3228,6 @@
|
|||
<typedef-decl name='uint8_t' type-id='c51d6389' id='b96825af'/>
|
||||
<typedef-decl name='uint32_t' type-id='62f1140c' id='8f92235e'/>
|
||||
<typedef-decl name='uint64_t' type-id='8910171f' id='9c313c2d'/>
|
||||
<class-decl name='__pthread_internal_list' size-in-bits='128' is-struct='yes' visibility='default' id='0e01899c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__prev' type-id='4d98cd5a' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='__next' type-id='4d98cd5a' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__pthread_list_t' type-id='0e01899c' id='518fb49c'/>
|
||||
<class-decl name='__pthread_mutex_s' size-in-bits='320' is-struct='yes' visibility='default' id='4c734837'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__lock' type-id='95e97e5e' visibility='default'/>
|
||||
|
@ -3263,6 +3254,15 @@
|
|||
<var-decl name='__list' type-id='518fb49c' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='__pthread_internal_list' size-in-bits='128' is-struct='yes' visibility='default' id='0e01899c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__prev' type-id='4d98cd5a' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='__next' type-id='4d98cd5a' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__pthread_list_t' type-id='0e01899c' id='518fb49c'/>
|
||||
<typedef-decl name='__uint8_t' type-id='002ac4a6' id='c51d6389'/>
|
||||
<typedef-decl name='__int32_t' type-id='95e97e5e' id='33f57a65'/>
|
||||
<typedef-decl name='__uint32_t' type-id='f0981eeb' id='62f1140c'/>
|
||||
|
@ -3280,6 +3280,7 @@
|
|||
<pointer-type-def type-id='95942d0c' size-in-bits='64' id='b0382bb3'/>
|
||||
<pointer-type-def type-id='8e8d4be3' size-in-bits='64' id='5ce45b60'/>
|
||||
<pointer-type-def type-id='5ce45b60' size-in-bits='64' id='857bb57e'/>
|
||||
<pointer-type-def type-id='b48d2441' size-in-bits='64' id='33976309'/>
|
||||
<pointer-type-def type-id='b96825af' size-in-bits='64' id='ae3e8ca6'/>
|
||||
<pointer-type-def type-id='002ac4a6' size-in-bits='64' id='cf536864'/>
|
||||
<pointer-type-def type-id='7f84e390' size-in-bits='64' id='de82c773'/>
|
||||
|
@ -3287,6 +3288,7 @@
|
|||
<pointer-type-def type-id='48b5725f' size-in-bits='64' id='eaa32e2f'/>
|
||||
<pointer-type-def type-id='775509eb' size-in-bits='64' id='9200a744'/>
|
||||
<pointer-type-def type-id='b1efc708' size-in-bits='64' id='4c81de99'/>
|
||||
<class-decl name='re_dfa_t' is-struct='yes' visibility='default' is-declaration-only='yes' id='b48d2441'/>
|
||||
<class-decl name='uu_avl' is-struct='yes' visibility='default' is-declaration-only='yes' id='4af029d1'/>
|
||||
<class-decl name='uu_avl_pool' is-struct='yes' visibility='default' is-declaration-only='yes' id='12a530a8'/>
|
||||
<function-decl name='zpool_get_config' mangled-name='zpool_get_config' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_get_config'>
|
||||
|
@ -4191,10 +4193,6 @@
|
|||
<parameter type-id='9200a744' name='zhp'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_shareall' mangled-name='zfs_shareall' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_shareall'>
|
||||
<parameter type-id='9200a744' name='zhp'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_unshare_nfs' mangled-name='zfs_unshare_nfs' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_unshare_nfs'>
|
||||
<parameter type-id='9200a744' name='zhp'/>
|
||||
<parameter type-id='80f4b756' name='mountpoint'/>
|
||||
|
@ -5639,7 +5637,7 @@
|
|||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='os/linux/zutil_import_os.c' language='LANG_C99'>
|
||||
<qualified-type-def type-id='80f4b756' const='yes' id='b99c00c9'/>
|
||||
<class-decl name='udev_device' is-struct='yes' visibility='default' is-declaration-only='yes' id='640b33ca'/>
|
||||
<pointer-type-def type-id='b99c00c9' size-in-bits='64' id='13956559'/>
|
||||
<pointer-type-def type-id='b59d7dce' size-in-bits='64' id='78c01427'/>
|
||||
<pointer-type-def type-id='640b33ca' size-in-bits='64' id='b32bae08'/>
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
* additional memory reference. Since the translation arrays are both very
|
||||
* small the data should remain efficiently in cache.
|
||||
*/
|
||||
static const int avl_child2balance[2] = {-1, 1};
|
||||
static const int avl_child2balance[] = {-1, 1};
|
||||
static const int avl_balance2child[] = {0, 0, 1};
|
||||
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ static aes_impl_ops_t aes_fastest_impl = {
|
|||
};
|
||||
|
||||
/* All compiled in implementations */
|
||||
const aes_impl_ops_t *aes_all_impl[] = {
|
||||
static const aes_impl_ops_t *aes_all_impl[] = {
|
||||
&aes_generic_impl,
|
||||
#if defined(__x86_64)
|
||||
&aes_x86_64_impl,
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
#endif /* !MACHINE_IS_BIG_ENDIAN && !MACHINE_IS_LITTLE_ENDIAN */
|
||||
|
||||
#if !defined(MACHINE_IS_BIG_ENDIAN) && !defined(MACHINE_IS_LITTLE_ENDIAN)
|
||||
#error unknown machine byte sex
|
||||
#error unknown machine byte order
|
||||
#endif
|
||||
|
||||
#define BYTEORDER_INCLUDED
|
||||
|
|
|
@ -779,7 +779,7 @@ static gcm_impl_ops_t gcm_fastest_impl = {
|
|||
};
|
||||
|
||||
/* All compiled in implementations */
|
||||
const gcm_impl_ops_t *gcm_all_impl[] = {
|
||||
static const gcm_impl_ops_t *gcm_all_impl[] = {
|
||||
&gcm_generic_impl,
|
||||
#if defined(__x86_64) && defined(HAVE_PCLMULQDQ)
|
||||
&gcm_pclmulqdq_impl,
|
||||
|
@ -1046,9 +1046,6 @@ MODULE_PARM_DESC(icp_gcm_impl, "Select gcm implementation.");
|
|||
#define GCM_AVX_MAX_CHUNK_SIZE \
|
||||
(((128*1024)/GCM_AVX_MIN_DECRYPT_BYTES) * GCM_AVX_MIN_DECRYPT_BYTES)
|
||||
|
||||
/* Get the chunk size module parameter. */
|
||||
#define GCM_CHUNK_SIZE_READ *(volatile uint32_t *) &gcm_avx_chunk_size
|
||||
|
||||
/* Clear the FPU registers since they hold sensitive internal state. */
|
||||
#define clear_fpu_regs() clear_fpu_regs_avx()
|
||||
#define GHASH_AVX(ctx, in, len) \
|
||||
|
@ -1057,6 +1054,9 @@ MODULE_PARM_DESC(icp_gcm_impl, "Select gcm implementation.");
|
|||
|
||||
#define gcm_incr_counter_block(ctx) gcm_incr_counter_block_by(ctx, 1)
|
||||
|
||||
/* Get the chunk size module parameter. */
|
||||
#define GCM_CHUNK_SIZE_READ *(volatile uint32_t *) &gcm_avx_chunk_size
|
||||
|
||||
/*
|
||||
* Module parameter: number of bytes to process at once while owning the FPU.
|
||||
* Rounded down to the next GCM_AVX_MIN_DECRYPT_BYTES byte boundary and is
|
||||
|
|
|
@ -65,7 +65,7 @@ static void SHA256Transform(SHA2_CTX *, const uint8_t *);
|
|||
static void SHA512Transform(SHA2_CTX *, const uint8_t *);
|
||||
#endif /* __amd64 && _KERNEL */
|
||||
|
||||
static uint8_t PADDING[128] = { 0x80, /* all zeros */ };
|
||||
static const uint8_t PADDING[128] = { 0x80, /* all zeros */ };
|
||||
|
||||
/*
|
||||
* The low-level checksum routines use a lot of stack space. On systems where
|
||||
|
|
|
@ -263,8 +263,6 @@ extern const uint64_t SKEIN_256_IV_128[];
|
|||
extern const uint64_t SKEIN_256_IV_160[];
|
||||
extern const uint64_t SKEIN_256_IV_224[];
|
||||
extern const uint64_t SKEIN_256_IV_256[];
|
||||
extern const uint64_t SKEIN_512_IV_128[];
|
||||
extern const uint64_t SKEIN_512_IV_160[];
|
||||
extern const uint64_t SKEIN_512_IV_224[];
|
||||
extern const uint64_t SKEIN_512_IV_256[];
|
||||
extern const uint64_t SKEIN_512_IV_384[];
|
||||
|
|
|
@ -52,30 +52,6 @@ const uint64_t SKEIN_256_IV_256[] = {
|
|||
MK_64(0x6A54E920, 0xFDE8DA69)
|
||||
};
|
||||
|
||||
/* blkSize = 512 bits. hashSize = 128 bits */
|
||||
const uint64_t SKEIN_512_IV_128[] = {
|
||||
MK_64(0xA8BC7BF3, 0x6FBF9F52),
|
||||
MK_64(0x1E9872CE, 0xBD1AF0AA),
|
||||
MK_64(0x309B1790, 0xB32190D3),
|
||||
MK_64(0xBCFBB854, 0x3F94805C),
|
||||
MK_64(0x0DA61BCD, 0x6E31B11B),
|
||||
MK_64(0x1A18EBEA, 0xD46A32E3),
|
||||
MK_64(0xA2CC5B18, 0xCE84AA82),
|
||||
MK_64(0x6982AB28, 0x9D46982D)
|
||||
};
|
||||
|
||||
/* blkSize = 512 bits. hashSize = 160 bits */
|
||||
const uint64_t SKEIN_512_IV_160[] = {
|
||||
MK_64(0x28B81A2A, 0xE013BD91),
|
||||
MK_64(0xC2F11668, 0xB5BDF78F),
|
||||
MK_64(0x1760D8F3, 0xF6A56F12),
|
||||
MK_64(0x4FB74758, 0x8239904F),
|
||||
MK_64(0x21EDE07F, 0x7EAF5056),
|
||||
MK_64(0xD908922E, 0x63ED70B8),
|
||||
MK_64(0xB8EC76FF, 0xECCB52FA),
|
||||
MK_64(0x01A47BB8, 0xA3F27A6E)
|
||||
};
|
||||
|
||||
/* blkSize = 512 bits. hashSize = 224 bits */
|
||||
const uint64_t SKEIN_512_IV_224[] = {
|
||||
MK_64(0xCCD06162, 0x48677224),
|
||||
|
|
|
@ -62,7 +62,7 @@ static kcf_ntfy_elem_t *ntfy_list_head;
|
|||
* CRYPTO_MECH_INVALID otherwise.
|
||||
*/
|
||||
crypto_mech_type_t
|
||||
crypto_mech2id(char *mechname)
|
||||
crypto_mech2id(const char *mechname)
|
||||
{
|
||||
return (crypto_mech2id_common(mechname, B_TRUE));
|
||||
}
|
||||
|
|
|
@ -693,7 +693,7 @@ aes_decrypt_amd64(const uint32_t rk[], int Nr, const uint32_t ct[4],
|
|||
* int aes_encrypt(const unsigned char *in,
|
||||
* unsigned char *out, const aes_encrypt_ctx cx[1])/
|
||||
*/
|
||||
.data
|
||||
.section .rodata
|
||||
.align 64
|
||||
enc_tab:
|
||||
enc_vals(u8)
|
||||
|
@ -798,7 +798,7 @@ ENTRY_NP(aes_encrypt_amd64)
|
|||
* int aes_decrypt(const unsigned char *in,
|
||||
* unsigned char *out, const aes_encrypt_ctx cx[1])/
|
||||
*/
|
||||
.data
|
||||
.section .rodata
|
||||
.align 64
|
||||
dec_tab:
|
||||
dec_vals(v8)
|
||||
|
|
|
@ -101,7 +101,7 @@ gcm_mul_pclmulqdq(uint64_t *x_in, uint64_t *y, uint64_t *res) {
|
|||
|
||||
// static uint8_t byte_swap16_mask[] = {
|
||||
// 15, 14, 13, 12, 11, 10, 9, 8, 7, 6 ,5, 4, 3, 2, 1, 0 };
|
||||
.data
|
||||
.section .rodata
|
||||
.align XMM_ALIGN
|
||||
.Lbyte_swap16_mask:
|
||||
.byte 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
|
||||
|
|
|
@ -2062,7 +2062,7 @@ ENTRY_NP(SHA256TransformBlocks)
|
|||
.cfi_endproc
|
||||
SET_SIZE(SHA256TransformBlocks)
|
||||
|
||||
.data
|
||||
.section .rodata
|
||||
.align 64
|
||||
.type K256,@object
|
||||
K256:
|
||||
|
|
|
@ -2063,7 +2063,7 @@ ENTRY_NP(SHA512TransformBlocks)
|
|||
.cfi_endproc
|
||||
SET_SIZE(SHA512TransformBlocks)
|
||||
|
||||
.data
|
||||
.section .rodata
|
||||
.align 64
|
||||
.type K512,@object
|
||||
K512:
|
||||
|
|
|
@ -116,7 +116,7 @@ kcf_get_hardware_provider(crypto_mech_type_t mech_type_1,
|
|||
kcf_provider_list_t *p;
|
||||
kcf_ops_class_t class;
|
||||
kcf_mech_entry_t *me;
|
||||
kcf_mech_entry_tab_t *me_tab;
|
||||
const kcf_mech_entry_tab_t *me_tab;
|
||||
int index, len, gqlen = INT_MAX, rv = CRYPTO_SUCCESS;
|
||||
|
||||
/* get the mech entry for the specified mechanism */
|
||||
|
@ -258,7 +258,7 @@ kcf_get_mech_provider(crypto_mech_type_t mech_type, kcf_mech_entry_t **mepp,
|
|||
kcf_ops_class_t class;
|
||||
int index;
|
||||
kcf_mech_entry_t *me;
|
||||
kcf_mech_entry_tab_t *me_tab;
|
||||
const kcf_mech_entry_tab_t *me_tab;
|
||||
|
||||
class = KCF_MECH2CLASS(mech_type);
|
||||
if ((class < KCF_FIRST_OPSCLASS) || (class > KCF_LAST_OPSCLASS)) {
|
||||
|
|
|
@ -82,14 +82,14 @@
|
|||
|
||||
/* RFE 4687834 Will deal with the extensibility of these tables later */
|
||||
|
||||
kcf_mech_entry_t kcf_digest_mechs_tab[KCF_MAXDIGEST];
|
||||
kcf_mech_entry_t kcf_cipher_mechs_tab[KCF_MAXCIPHER];
|
||||
kcf_mech_entry_t kcf_mac_mechs_tab[KCF_MAXMAC];
|
||||
kcf_mech_entry_t kcf_sign_mechs_tab[KCF_MAXSIGN];
|
||||
kcf_mech_entry_t kcf_keyops_mechs_tab[KCF_MAXKEYOPS];
|
||||
kcf_mech_entry_t kcf_misc_mechs_tab[KCF_MAXMISC];
|
||||
static kcf_mech_entry_t kcf_digest_mechs_tab[KCF_MAXDIGEST];
|
||||
static kcf_mech_entry_t kcf_cipher_mechs_tab[KCF_MAXCIPHER];
|
||||
static kcf_mech_entry_t kcf_mac_mechs_tab[KCF_MAXMAC];
|
||||
static kcf_mech_entry_t kcf_sign_mechs_tab[KCF_MAXSIGN];
|
||||
static kcf_mech_entry_t kcf_keyops_mechs_tab[KCF_MAXKEYOPS];
|
||||
static kcf_mech_entry_t kcf_misc_mechs_tab[KCF_MAXMISC];
|
||||
|
||||
kcf_mech_entry_tab_t kcf_mech_tabs_tab[KCF_LAST_OPSCLASS + 1] = {
|
||||
const kcf_mech_entry_tab_t kcf_mech_tabs_tab[KCF_LAST_OPSCLASS + 1] = {
|
||||
{0, NULL}, /* No class zero */
|
||||
{KCF_MAXDIGEST, kcf_digest_mechs_tab},
|
||||
{KCF_MAXCIPHER, kcf_cipher_mechs_tab},
|
||||
|
@ -108,22 +108,22 @@ kcf_mech_entry_tab_t kcf_mech_tabs_tab[KCF_LAST_OPSCLASS + 1] = {
|
|||
* There is room for refinement here.
|
||||
*
|
||||
*/
|
||||
int kcf_md5_threshold = 512;
|
||||
int kcf_sha1_threshold = 512;
|
||||
int kcf_des_threshold = 512;
|
||||
int kcf_des3_threshold = 512;
|
||||
int kcf_aes_threshold = 512;
|
||||
int kcf_bf_threshold = 512;
|
||||
int kcf_rc4_threshold = 512;
|
||||
static const int kcf_md5_threshold = 512;
|
||||
static const int kcf_sha1_threshold = 512;
|
||||
static const int kcf_des_threshold = 512;
|
||||
static const int kcf_des3_threshold = 512;
|
||||
static const int kcf_aes_threshold = 512;
|
||||
static const int kcf_bf_threshold = 512;
|
||||
static const int kcf_rc4_threshold = 512;
|
||||
|
||||
kmutex_t kcf_mech_tabs_lock;
|
||||
static kmutex_t kcf_mech_tabs_lock;
|
||||
static uint32_t kcf_gen_swprov = 0;
|
||||
|
||||
int kcf_mech_hash_size = 256;
|
||||
mod_hash_t *kcf_mech_hash; /* mech name to id hash */
|
||||
static const int kcf_mech_hash_size = 256;
|
||||
static mod_hash_t *kcf_mech_hash; /* mech name to id hash */
|
||||
|
||||
static crypto_mech_type_t
|
||||
kcf_mech_hash_find(char *mechname)
|
||||
kcf_mech_hash_find(const char *mechname)
|
||||
{
|
||||
mod_hash_val_t hv;
|
||||
crypto_mech_type_t mt;
|
||||
|
@ -166,7 +166,6 @@ kcf_destroy_mech_tabs(void)
|
|||
void
|
||||
kcf_init_mech_tabs(void)
|
||||
{
|
||||
int i, max;
|
||||
kcf_ops_class_t class;
|
||||
kcf_mech_entry_t *me_tab;
|
||||
|
||||
|
@ -249,9 +248,9 @@ kcf_init_mech_tabs(void)
|
|||
kcf_mech_hash_size, mod_hash_null_valdtor);
|
||||
|
||||
for (class = KCF_FIRST_OPSCLASS; class <= KCF_LAST_OPSCLASS; class++) {
|
||||
max = kcf_mech_tabs_tab[class].met_size;
|
||||
int max = kcf_mech_tabs_tab[class].met_size;
|
||||
me_tab = kcf_mech_tabs_tab[class].met_tab;
|
||||
for (i = 0; i < max; i++) {
|
||||
for (int i = 0; i < max; i++) {
|
||||
mutex_init(&(me_tab[i].me_mutex), NULL,
|
||||
MUTEX_DEFAULT, NULL);
|
||||
if (me_tab[i].me_name[0] != 0) {
|
||||
|
@ -747,7 +746,7 @@ kcf_get_mech_entry(crypto_mech_type_t mech_type, kcf_mech_entry_t **mep)
|
|||
{
|
||||
kcf_ops_class_t class;
|
||||
int index;
|
||||
kcf_mech_entry_tab_t *me_tab;
|
||||
const kcf_mech_entry_tab_t *me_tab;
|
||||
|
||||
ASSERT(mep != NULL);
|
||||
|
||||
|
@ -778,7 +777,7 @@ kcf_get_mech_entry(crypto_mech_type_t mech_type, kcf_mech_entry_t **mep)
|
|||
* to load it.
|
||||
*/
|
||||
crypto_mech_type_t
|
||||
crypto_mech2id_common(char *mechname, boolean_t load_module)
|
||||
crypto_mech2id_common(const char *mechname, boolean_t load_module)
|
||||
{
|
||||
(void) load_module;
|
||||
return (kcf_mech_hash_find(mechname));
|
||||
|
|
|
@ -205,7 +205,8 @@ kcf_prov_tab_lookup(crypto_provider_id_t prov_id)
|
|||
}
|
||||
|
||||
static void
|
||||
allocate_ops_v1(crypto_ops_t *src, crypto_ops_t *dst, uint_t *mech_list_count)
|
||||
allocate_ops_v1(const crypto_ops_t *src, crypto_ops_t *dst,
|
||||
uint_t *mech_list_count)
|
||||
{
|
||||
if (src->co_control_ops != NULL)
|
||||
dst->co_control_ops = kmem_alloc(sizeof (crypto_control_ops_t),
|
||||
|
@ -274,7 +275,7 @@ allocate_ops_v1(crypto_ops_t *src, crypto_ops_t *dst, uint_t *mech_list_count)
|
|||
}
|
||||
|
||||
static void
|
||||
allocate_ops_v2(crypto_ops_t *src, crypto_ops_t *dst)
|
||||
allocate_ops_v2(const crypto_ops_t *src, crypto_ops_t *dst)
|
||||
{
|
||||
if (src->co_mech_ops != NULL)
|
||||
dst->co_mech_ops = kmem_alloc(sizeof (crypto_mech_ops_t),
|
||||
|
@ -282,7 +283,7 @@ allocate_ops_v2(crypto_ops_t *src, crypto_ops_t *dst)
|
|||
}
|
||||
|
||||
static void
|
||||
allocate_ops_v3(crypto_ops_t *src, crypto_ops_t *dst)
|
||||
allocate_ops_v3(const crypto_ops_t *src, crypto_ops_t *dst)
|
||||
{
|
||||
if (src->co_nostore_key_ops != NULL)
|
||||
dst->co_nostore_key_ops =
|
||||
|
@ -297,12 +298,11 @@ allocate_ops_v3(crypto_ops_t *src, crypto_ops_t *dst)
|
|||
* since it is invoked from user context during provider registration.
|
||||
*/
|
||||
kcf_provider_desc_t *
|
||||
kcf_alloc_provider_desc(crypto_provider_info_t *info)
|
||||
kcf_alloc_provider_desc(const crypto_provider_info_t *info)
|
||||
{
|
||||
int i, j;
|
||||
kcf_provider_desc_t *desc;
|
||||
uint_t mech_list_count = info->pi_mech_list_count;
|
||||
crypto_ops_t *src_ops = info->pi_ops_vector;
|
||||
const crypto_ops_t *src_ops = info->pi_ops_vector;
|
||||
|
||||
desc = kmem_zalloc(sizeof (kcf_provider_desc_t), KM_SLEEP);
|
||||
|
||||
|
@ -330,21 +330,22 @@ kcf_alloc_provider_desc(crypto_provider_info_t *info)
|
|||
* KCF needs to allocate storage where copies of the ops
|
||||
* vectors are copied.
|
||||
*/
|
||||
desc->pd_ops_vector = kmem_zalloc(sizeof (crypto_ops_t), KM_SLEEP);
|
||||
crypto_ops_t *opvec = kmem_zalloc(sizeof (crypto_ops_t), KM_SLEEP);
|
||||
|
||||
if (info->pi_provider_type != CRYPTO_LOGICAL_PROVIDER) {
|
||||
allocate_ops_v1(src_ops, desc->pd_ops_vector, &mech_list_count);
|
||||
allocate_ops_v1(src_ops, opvec, &mech_list_count);
|
||||
if (info->pi_interface_version >= CRYPTO_SPI_VERSION_2)
|
||||
allocate_ops_v2(src_ops, desc->pd_ops_vector);
|
||||
allocate_ops_v2(src_ops, opvec);
|
||||
if (info->pi_interface_version == CRYPTO_SPI_VERSION_3)
|
||||
allocate_ops_v3(src_ops, desc->pd_ops_vector);
|
||||
allocate_ops_v3(src_ops, opvec);
|
||||
}
|
||||
desc->pd_ops_vector = opvec;
|
||||
|
||||
desc->pd_mech_list_count = mech_list_count;
|
||||
desc->pd_mechanisms = kmem_zalloc(sizeof (crypto_mech_info_t) *
|
||||
mech_list_count, KM_SLEEP);
|
||||
for (i = 0; i < KCF_OPS_CLASSSIZE; i++)
|
||||
for (j = 0; j < KCF_MAXMECHTAB; j++)
|
||||
for (int i = 0; i < KCF_OPS_CLASSSIZE; i++)
|
||||
for (int j = 0; j < KCF_MAXMECHTAB; j++)
|
||||
desc->pd_mech_indx[i][j] = KCF_INVALID_INDX;
|
||||
|
||||
desc->pd_prov_id = KCF_PROVID_INVALID;
|
||||
|
|
|
@ -35,15 +35,12 @@
|
|||
#include <sys/crypto/sched_impl.h>
|
||||
#include <sys/crypto/api.h>
|
||||
|
||||
kcf_global_swq_t *gswq; /* Global software queue */
|
||||
static kcf_global_swq_t *gswq; /* Global software queue */
|
||||
|
||||
/* Thread pool related variables */
|
||||
static kcf_pool_t *kcfpool; /* Thread pool of kcfd LWPs */
|
||||
int kcf_maxthreads = 2;
|
||||
int kcf_minthreads = 1;
|
||||
int kcf_thr_multiple = 2; /* Boot-time tunable for experimentation */
|
||||
static ulong_t kcf_idlethr_timeout;
|
||||
#define KCF_DEFAULT_THRTIMEOUT 60000000 /* 60 seconds */
|
||||
static const int kcf_maxthreads = 2;
|
||||
static const int kcf_minthreads = 1;
|
||||
|
||||
/* kmem caches used by the scheduler */
|
||||
static kmem_cache_t *kcf_sreq_cache;
|
||||
|
@ -1289,8 +1286,6 @@ kcfpool_alloc()
|
|||
|
||||
mutex_init(&kcfpool->kp_user_lock, NULL, MUTEX_DEFAULT, NULL);
|
||||
cv_init(&kcfpool->kp_user_cv, NULL, CV_DEFAULT, NULL);
|
||||
|
||||
kcf_idlethr_timeout = KCF_DEFAULT_THRTIMEOUT;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -210,7 +210,7 @@ typedef struct kcf_provider_desc {
|
|||
struct kcf_provider_list *pd_provider_list;
|
||||
kcondvar_t pd_resume_cv;
|
||||
crypto_provider_handle_t pd_prov_handle;
|
||||
crypto_ops_t *pd_ops_vector;
|
||||
const crypto_ops_t *pd_ops_vector;
|
||||
ushort_t pd_mech_indx[KCF_OPS_CLASSSIZE]\
|
||||
[KCF_MAXMECHTAB];
|
||||
crypto_mech_info_t *pd_mechanisms;
|
||||
|
@ -397,19 +397,6 @@ extern kcf_soft_conf_entry_t *soft_config_list;
|
|||
#define KCF_MAXKEYOPS 116 /* Key generation and derivation */
|
||||
#define KCF_MAXMISC 16 /* Others ... */
|
||||
|
||||
#define KCF_MAXMECHS KCF_MAXDIGEST + KCF_MAXCIPHER + KCF_MAXMAC + \
|
||||
KCF_MAXSIGN + KCF_MAXKEYOPS + \
|
||||
KCF_MAXMISC
|
||||
|
||||
extern kcf_mech_entry_t kcf_digest_mechs_tab[];
|
||||
extern kcf_mech_entry_t kcf_cipher_mechs_tab[];
|
||||
extern kcf_mech_entry_t kcf_mac_mechs_tab[];
|
||||
extern kcf_mech_entry_t kcf_sign_mechs_tab[];
|
||||
extern kcf_mech_entry_t kcf_keyops_mechs_tab[];
|
||||
extern kcf_mech_entry_t kcf_misc_mechs_tab[];
|
||||
|
||||
extern kmutex_t kcf_mech_tabs_lock;
|
||||
|
||||
typedef enum {
|
||||
KCF_DIGEST_CLASS = 1,
|
||||
KCF_CIPHER_CLASS,
|
||||
|
@ -429,7 +416,7 @@ typedef struct kcf_mech_entry_tab {
|
|||
kcf_mech_entry_t *met_tab; /* the table */
|
||||
} kcf_mech_entry_tab_t;
|
||||
|
||||
extern kcf_mech_entry_tab_t kcf_mech_tabs_tab[];
|
||||
extern const kcf_mech_entry_tab_t kcf_mech_tabs_tab[];
|
||||
|
||||
#define KCF_MECHID(class, index) \
|
||||
(((crypto_mech_type_t)(class) << 32) | (crypto_mech_type_t)(index))
|
||||
|
@ -1283,12 +1270,13 @@ extern int kcf_add_mech_provider(short, kcf_provider_desc_t *,
|
|||
kcf_prov_mech_desc_t **);
|
||||
extern void kcf_remove_mech_provider(char *, kcf_provider_desc_t *);
|
||||
extern int kcf_get_mech_entry(crypto_mech_type_t, kcf_mech_entry_t **);
|
||||
extern kcf_provider_desc_t *kcf_alloc_provider_desc(crypto_provider_info_t *);
|
||||
extern kcf_provider_desc_t *kcf_alloc_provider_desc(
|
||||
const crypto_provider_info_t *);
|
||||
extern void kcf_provider_zero_refcnt(kcf_provider_desc_t *);
|
||||
extern void kcf_free_provider_desc(kcf_provider_desc_t *);
|
||||
extern void kcf_soft_config_init(void);
|
||||
extern int get_sw_provider_for_mech(crypto_mech_name_t, char **);
|
||||
extern crypto_mech_type_t crypto_mech2id_common(char *, boolean_t);
|
||||
extern crypto_mech_type_t crypto_mech2id_common(const char *, boolean_t);
|
||||
extern void undo_register_provider(kcf_provider_desc_t *, boolean_t);
|
||||
extern void redo_register_provider(kcf_provider_desc_t *);
|
||||
extern void kcf_rnd_init(void);
|
||||
|
|
|
@ -457,12 +457,9 @@ typedef struct kcf_ntfy_elem {
|
|||
#define CRYPTO_TASKQ_MIN 64
|
||||
#define CRYPTO_TASKQ_MAX 2 * 1024 * 1024
|
||||
|
||||
extern int crypto_taskq_threads;
|
||||
extern int crypto_taskq_minalloc;
|
||||
extern int crypto_taskq_maxalloc;
|
||||
extern kcf_global_swq_t *gswq;
|
||||
extern int kcf_maxthreads;
|
||||
extern int kcf_minthreads;
|
||||
extern const int crypto_taskq_threads;
|
||||
extern const int crypto_taskq_minalloc;
|
||||
extern const int crypto_taskq_maxalloc;
|
||||
|
||||
/*
|
||||
* All pending crypto bufcalls are put on a list. cbuf_list_lock
|
||||
|
|
|
@ -498,10 +498,10 @@ typedef struct crypto_nostore_key_ops {
|
|||
* by calling crypto_register_provider(9F).
|
||||
*/
|
||||
typedef struct crypto_ops_v1 {
|
||||
crypto_control_ops_t *co_control_ops;
|
||||
crypto_digest_ops_t *co_digest_ops;
|
||||
crypto_cipher_ops_t *co_cipher_ops;
|
||||
crypto_mac_ops_t *co_mac_ops;
|
||||
const crypto_control_ops_t *co_control_ops;
|
||||
const crypto_digest_ops_t *co_digest_ops;
|
||||
const crypto_cipher_ops_t *co_cipher_ops;
|
||||
const crypto_mac_ops_t *co_mac_ops;
|
||||
crypto_sign_ops_t *co_sign_ops;
|
||||
crypto_verify_ops_t *co_verify_ops;
|
||||
crypto_dual_ops_t *co_dual_ops;
|
||||
|
@ -511,7 +511,7 @@ typedef struct crypto_ops_v1 {
|
|||
crypto_object_ops_t *co_object_ops;
|
||||
crypto_key_ops_t *co_key_ops;
|
||||
crypto_provider_management_ops_t *co_provider_ops;
|
||||
crypto_ctx_ops_t *co_ctx_ops;
|
||||
const crypto_ctx_ops_t *co_ctx_ops;
|
||||
} crypto_ops_v1_t;
|
||||
|
||||
typedef struct crypto_ops_v2 {
|
||||
|
@ -653,9 +653,9 @@ typedef struct crypto_provider_info_v1 {
|
|||
char *pi_provider_description;
|
||||
crypto_provider_type_t pi_provider_type;
|
||||
crypto_provider_handle_t pi_provider_handle;
|
||||
crypto_ops_t *pi_ops_vector;
|
||||
const crypto_ops_t *pi_ops_vector;
|
||||
uint_t pi_mech_list_count;
|
||||
crypto_mech_info_t *pi_mechanisms;
|
||||
const crypto_mech_info_t *pi_mechanisms;
|
||||
uint_t pi_logical_provider_count;
|
||||
crypto_kcf_provider_handle_t *pi_logical_providers;
|
||||
} crypto_provider_info_v1_t;
|
||||
|
@ -711,7 +711,7 @@ typedef struct crypto_provider_info {
|
|||
* of state changes, and notify the kernel when a asynchronous request
|
||||
* completed.
|
||||
*/
|
||||
extern int crypto_register_provider(crypto_provider_info_t *,
|
||||
extern int crypto_register_provider(const crypto_provider_info_t *,
|
||||
crypto_kcf_provider_handle_t *);
|
||||
extern int crypto_unregister_provider(crypto_kcf_provider_handle_t);
|
||||
extern void crypto_provider_notification(crypto_kcf_provider_handle_t, uint_t);
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
/*
|
||||
* Mechanism info structure passed to KCF during registration.
|
||||
*/
|
||||
static crypto_mech_info_t aes_mech_info_tab[] = {
|
||||
static const crypto_mech_info_t aes_mech_info_tab[] = {
|
||||
/* AES_ECB */
|
||||
{SUN_CKM_AES_ECB, AES_ECB_MECH_INFO_TYPE,
|
||||
CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
|
||||
|
@ -77,7 +77,7 @@ static crypto_mech_info_t aes_mech_info_tab[] = {
|
|||
|
||||
static void aes_provider_status(crypto_provider_handle_t, uint_t *);
|
||||
|
||||
static crypto_control_ops_t aes_control_ops = {
|
||||
static const crypto_control_ops_t aes_control_ops = {
|
||||
aes_provider_status
|
||||
};
|
||||
|
||||
|
@ -110,7 +110,7 @@ static int aes_decrypt_atomic(crypto_provider_handle_t, crypto_session_id_t,
|
|||
crypto_mechanism_t *, crypto_key_t *, crypto_data_t *,
|
||||
crypto_data_t *, crypto_spi_ctx_template_t, crypto_req_handle_t);
|
||||
|
||||
static crypto_cipher_ops_t aes_cipher_ops = {
|
||||
static const crypto_cipher_ops_t aes_cipher_ops = {
|
||||
.encrypt_init = aes_encrypt_init,
|
||||
.encrypt = aes_encrypt,
|
||||
.encrypt_update = aes_encrypt_update,
|
||||
|
@ -130,7 +130,7 @@ static int aes_mac_verify_atomic(crypto_provider_handle_t, crypto_session_id_t,
|
|||
crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *,
|
||||
crypto_spi_ctx_template_t, crypto_req_handle_t);
|
||||
|
||||
static crypto_mac_ops_t aes_mac_ops = {
|
||||
static const crypto_mac_ops_t aes_mac_ops = {
|
||||
.mac_init = NULL,
|
||||
.mac = NULL,
|
||||
.mac_update = NULL,
|
||||
|
@ -144,12 +144,12 @@ static int aes_create_ctx_template(crypto_provider_handle_t,
|
|||
size_t *, crypto_req_handle_t);
|
||||
static int aes_free_context(crypto_ctx_t *);
|
||||
|
||||
static crypto_ctx_ops_t aes_ctx_ops = {
|
||||
static const crypto_ctx_ops_t aes_ctx_ops = {
|
||||
.create_ctx_template = aes_create_ctx_template,
|
||||
.free_context = aes_free_context
|
||||
};
|
||||
|
||||
static crypto_ops_t aes_crypto_ops = {{{{{
|
||||
static const crypto_ops_t aes_crypto_ops = {{{{{
|
||||
&aes_control_ops,
|
||||
NULL,
|
||||
&aes_cipher_ops,
|
||||
|
@ -166,13 +166,13 @@ static crypto_ops_t aes_crypto_ops = {{{{{
|
|||
&aes_ctx_ops
|
||||
}}}}};
|
||||
|
||||
static crypto_provider_info_t aes_prov_info = {{{{
|
||||
static const crypto_provider_info_t aes_prov_info = {{{{
|
||||
CRYPTO_SPI_VERSION_1,
|
||||
"AES Software Provider",
|
||||
CRYPTO_SW_PROVIDER,
|
||||
NULL,
|
||||
&aes_crypto_ops,
|
||||
sizeof (aes_mech_info_tab)/sizeof (crypto_mech_info_t),
|
||||
sizeof (aes_mech_info_tab) / sizeof (crypto_mech_info_t),
|
||||
aes_mech_info_tab
|
||||
}}}};
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
/*
|
||||
* Mechanism info structure passed to KCF during registration.
|
||||
*/
|
||||
static crypto_mech_info_t sha2_mech_info_tab[] = {
|
||||
static const crypto_mech_info_t sha2_mech_info_tab[] = {
|
||||
/* SHA256 */
|
||||
{SUN_CKM_SHA256, SHA256_MECH_INFO_TYPE,
|
||||
CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC,
|
||||
|
@ -107,7 +107,7 @@ static crypto_mech_info_t sha2_mech_info_tab[] = {
|
|||
|
||||
static void sha2_provider_status(crypto_provider_handle_t, uint_t *);
|
||||
|
||||
static crypto_control_ops_t sha2_control_ops = {
|
||||
static const crypto_control_ops_t sha2_control_ops = {
|
||||
sha2_provider_status
|
||||
};
|
||||
|
||||
|
@ -123,7 +123,7 @@ static int sha2_digest_atomic(crypto_provider_handle_t, crypto_session_id_t,
|
|||
crypto_mechanism_t *, crypto_data_t *, crypto_data_t *,
|
||||
crypto_req_handle_t);
|
||||
|
||||
static crypto_digest_ops_t sha2_digest_ops = {
|
||||
static const crypto_digest_ops_t sha2_digest_ops = {
|
||||
.digest_init = sha2_digest_init,
|
||||
.digest = sha2_digest,
|
||||
.digest_update = sha2_digest_update,
|
||||
|
@ -144,7 +144,7 @@ static int sha2_mac_verify_atomic(crypto_provider_handle_t, crypto_session_id_t,
|
|||
crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *,
|
||||
crypto_spi_ctx_template_t, crypto_req_handle_t);
|
||||
|
||||
static crypto_mac_ops_t sha2_mac_ops = {
|
||||
static const crypto_mac_ops_t sha2_mac_ops = {
|
||||
.mac_init = sha2_mac_init,
|
||||
.mac = NULL,
|
||||
.mac_update = sha2_mac_update,
|
||||
|
@ -158,12 +158,12 @@ static int sha2_create_ctx_template(crypto_provider_handle_t,
|
|||
size_t *, crypto_req_handle_t);
|
||||
static int sha2_free_context(crypto_ctx_t *);
|
||||
|
||||
static crypto_ctx_ops_t sha2_ctx_ops = {
|
||||
static const crypto_ctx_ops_t sha2_ctx_ops = {
|
||||
.create_ctx_template = sha2_create_ctx_template,
|
||||
.free_context = sha2_free_context
|
||||
};
|
||||
|
||||
static crypto_ops_t sha2_crypto_ops = {{{{{
|
||||
static const crypto_ops_t sha2_crypto_ops = {{{{{
|
||||
&sha2_control_ops,
|
||||
&sha2_digest_ops,
|
||||
NULL,
|
||||
|
@ -180,13 +180,13 @@ static crypto_ops_t sha2_crypto_ops = {{{{{
|
|||
&sha2_ctx_ops
|
||||
}}}}};
|
||||
|
||||
static crypto_provider_info_t sha2_prov_info = {{{{
|
||||
static const crypto_provider_info_t sha2_prov_info = {{{{
|
||||
CRYPTO_SPI_VERSION_1,
|
||||
"SHA2 Software Provider",
|
||||
CRYPTO_SW_PROVIDER,
|
||||
NULL,
|
||||
&sha2_crypto_ops,
|
||||
sizeof (sha2_mech_info_tab)/sizeof (crypto_mech_info_t),
|
||||
sizeof (sha2_mech_info_tab) / sizeof (crypto_mech_info_t),
|
||||
sha2_mech_info_tab
|
||||
}}}};
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#define SKEIN_MODULE_IMPL
|
||||
#include <sys/skein.h>
|
||||
|
||||
static crypto_mech_info_t skein_mech_info_tab[] = {
|
||||
static const crypto_mech_info_t skein_mech_info_tab[] = {
|
||||
{CKM_SKEIN_256, SKEIN_256_MECH_INFO_TYPE,
|
||||
CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC,
|
||||
0, 0, CRYPTO_KEYSIZE_UNIT_IN_BITS},
|
||||
|
@ -53,7 +53,7 @@ static crypto_mech_info_t skein_mech_info_tab[] = {
|
|||
|
||||
static void skein_provider_status(crypto_provider_handle_t, uint_t *);
|
||||
|
||||
static crypto_control_ops_t skein_control_ops = {
|
||||
static const crypto_control_ops_t skein_control_ops = {
|
||||
skein_provider_status
|
||||
};
|
||||
|
||||
|
@ -67,7 +67,7 @@ static int skein_digest_atomic(crypto_provider_handle_t, crypto_session_id_t,
|
|||
crypto_mechanism_t *, crypto_data_t *, crypto_data_t *,
|
||||
crypto_req_handle_t);
|
||||
|
||||
static crypto_digest_ops_t skein_digest_ops = {
|
||||
static const crypto_digest_ops_t skein_digest_ops = {
|
||||
.digest_init = skein_digest_init,
|
||||
.digest = skein_digest,
|
||||
.digest_update = skein_update,
|
||||
|
@ -82,7 +82,7 @@ static int skein_mac_atomic(crypto_provider_handle_t, crypto_session_id_t,
|
|||
crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *,
|
||||
crypto_spi_ctx_template_t, crypto_req_handle_t);
|
||||
|
||||
static crypto_mac_ops_t skein_mac_ops = {
|
||||
static const crypto_mac_ops_t skein_mac_ops = {
|
||||
.mac_init = skein_mac_init,
|
||||
.mac = NULL,
|
||||
.mac_update = skein_update, /* using regular digest update is OK here */
|
||||
|
@ -96,12 +96,12 @@ static int skein_create_ctx_template(crypto_provider_handle_t,
|
|||
size_t *, crypto_req_handle_t);
|
||||
static int skein_free_context(crypto_ctx_t *);
|
||||
|
||||
static crypto_ctx_ops_t skein_ctx_ops = {
|
||||
static const crypto_ctx_ops_t skein_ctx_ops = {
|
||||
.create_ctx_template = skein_create_ctx_template,
|
||||
.free_context = skein_free_context
|
||||
};
|
||||
|
||||
static crypto_ops_t skein_crypto_ops = {{{{{
|
||||
static const crypto_ops_t skein_crypto_ops = {{{{{
|
||||
&skein_control_ops,
|
||||
&skein_digest_ops,
|
||||
NULL,
|
||||
|
@ -118,7 +118,7 @@ static crypto_ops_t skein_crypto_ops = {{{{{
|
|||
&skein_ctx_ops,
|
||||
}}}}};
|
||||
|
||||
static crypto_provider_info_t skein_prov_info = {{{{
|
||||
static const crypto_provider_info_t skein_prov_info = {{{{
|
||||
CRYPTO_SPI_VERSION_1,
|
||||
"Skein Software Provider",
|
||||
CRYPTO_SW_PROVIDER,
|
||||
|
|
|
@ -39,18 +39,19 @@
|
|||
/*
|
||||
* minalloc and maxalloc values to be used for taskq_create().
|
||||
*/
|
||||
int crypto_taskq_threads = CRYPTO_TASKQ_THREADS;
|
||||
int crypto_taskq_minalloc = CRYPTO_TASKQ_MIN;
|
||||
int crypto_taskq_maxalloc = CRYPTO_TASKQ_MAX;
|
||||
const int crypto_taskq_threads = CRYPTO_TASKQ_THREADS;
|
||||
const int crypto_taskq_minalloc = CRYPTO_TASKQ_MIN;
|
||||
const int crypto_taskq_maxalloc = CRYPTO_TASKQ_MAX;
|
||||
|
||||
static void remove_provider(kcf_provider_desc_t *);
|
||||
static void process_logical_providers(crypto_provider_info_t *,
|
||||
static void process_logical_providers(const crypto_provider_info_t *,
|
||||
kcf_provider_desc_t *);
|
||||
static int init_prov_mechs(const crypto_provider_info_t *,
|
||||
kcf_provider_desc_t *);
|
||||
static int init_prov_mechs(crypto_provider_info_t *, kcf_provider_desc_t *);
|
||||
static int kcf_prov_kstat_update(kstat_t *, int);
|
||||
static void delete_kstat(kcf_provider_desc_t *);
|
||||
|
||||
static kcf_prov_stats_t kcf_stats_ks_data_template = {
|
||||
static const kcf_prov_stats_t kcf_stats_ks_data_template = {
|
||||
{ "kcf_ops_total", KSTAT_DATA_UINT64 },
|
||||
{ "kcf_ops_passed", KSTAT_DATA_UINT64 },
|
||||
{ "kcf_ops_failed", KSTAT_DATA_UINT64 },
|
||||
|
@ -58,7 +59,7 @@ static kcf_prov_stats_t kcf_stats_ks_data_template = {
|
|||
};
|
||||
|
||||
#define KCF_SPI_COPY_OPS(src, dst, ops) if ((src)->ops != NULL) \
|
||||
*((dst)->ops) = *((src)->ops);
|
||||
memcpy((void *) (dst)->ops, (src)->ops, sizeof (*(src)->ops));
|
||||
|
||||
/*
|
||||
* Copy an ops vector from src to dst. Used during provider registration
|
||||
|
@ -69,7 +70,7 @@ static kcf_prov_stats_t kcf_stats_ks_data_template = {
|
|||
* persistent.
|
||||
*/
|
||||
static void
|
||||
copy_ops_vector_v1(crypto_ops_t *src_ops, crypto_ops_t *dst_ops)
|
||||
copy_ops_vector_v1(const crypto_ops_t *src_ops, crypto_ops_t *dst_ops)
|
||||
{
|
||||
KCF_SPI_COPY_OPS(src_ops, dst_ops, co_control_ops);
|
||||
KCF_SPI_COPY_OPS(src_ops, dst_ops, co_digest_ops);
|
||||
|
@ -88,13 +89,13 @@ copy_ops_vector_v1(crypto_ops_t *src_ops, crypto_ops_t *dst_ops)
|
|||
}
|
||||
|
||||
static void
|
||||
copy_ops_vector_v2(crypto_ops_t *src_ops, crypto_ops_t *dst_ops)
|
||||
copy_ops_vector_v2(const crypto_ops_t *src_ops, crypto_ops_t *dst_ops)
|
||||
{
|
||||
KCF_SPI_COPY_OPS(src_ops, dst_ops, co_mech_ops);
|
||||
}
|
||||
|
||||
static void
|
||||
copy_ops_vector_v3(crypto_ops_t *src_ops, crypto_ops_t *dst_ops)
|
||||
copy_ops_vector_v3(const crypto_ops_t *src_ops, crypto_ops_t *dst_ops)
|
||||
{
|
||||
KCF_SPI_COPY_OPS(src_ops, dst_ops, co_nostore_key_ops);
|
||||
}
|
||||
|
@ -108,7 +109,7 @@ copy_ops_vector_v3(crypto_ops_t *src_ops, crypto_ops_t *dst_ops)
|
|||
* routines. Software providers call this routine in their _init() routine.
|
||||
*/
|
||||
int
|
||||
crypto_register_provider(crypto_provider_info_t *info,
|
||||
crypto_register_provider(const crypto_provider_info_t *info,
|
||||
crypto_kcf_provider_handle_t *handle)
|
||||
{
|
||||
char *ks_name;
|
||||
|
@ -158,16 +159,14 @@ crypto_register_provider(crypto_provider_info_t *info,
|
|||
if (info->pi_ops_vector == NULL) {
|
||||
goto bail;
|
||||
}
|
||||
copy_ops_vector_v1(info->pi_ops_vector,
|
||||
prov_desc->pd_ops_vector);
|
||||
crypto_ops_t *pvec = (crypto_ops_t *)prov_desc->pd_ops_vector;
|
||||
copy_ops_vector_v1(info->pi_ops_vector, pvec);
|
||||
if (info->pi_interface_version >= CRYPTO_SPI_VERSION_2) {
|
||||
copy_ops_vector_v2(info->pi_ops_vector,
|
||||
prov_desc->pd_ops_vector);
|
||||
copy_ops_vector_v2(info->pi_ops_vector, pvec);
|
||||
prov_desc->pd_flags = info->pi_flags;
|
||||
}
|
||||
if (info->pi_interface_version == CRYPTO_SPI_VERSION_3) {
|
||||
copy_ops_vector_v3(info->pi_ops_vector,
|
||||
prov_desc->pd_ops_vector);
|
||||
copy_ops_vector_v3(info->pi_ops_vector, pvec);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,8 +198,8 @@ crypto_register_provider(crypto_provider_info_t *info,
|
|||
*/
|
||||
if (prov_desc->pd_prov_type == CRYPTO_HW_PROVIDER)
|
||||
prov_desc->pd_sched_info.ks_taskq = taskq_create("kcf_taskq",
|
||||
crypto_taskq_threads, minclsyspri,
|
||||
crypto_taskq_minalloc, crypto_taskq_maxalloc,
|
||||
CRYPTO_TASKQ_THREADS, minclsyspri,
|
||||
CRYPTO_TASKQ_MIN, CRYPTO_TASKQ_MAX,
|
||||
TASKQ_PREPOPULATE);
|
||||
else
|
||||
prov_desc->pd_sched_info.ks_taskq = NULL;
|
||||
|
@ -566,7 +565,7 @@ crypto_kmflag(crypto_req_handle_t handle)
|
|||
* if the table of mechanisms is full.
|
||||
*/
|
||||
static int
|
||||
init_prov_mechs(crypto_provider_info_t *info, kcf_provider_desc_t *desc)
|
||||
init_prov_mechs(const crypto_provider_info_t *info, kcf_provider_desc_t *desc)
|
||||
{
|
||||
uint_t mech_idx;
|
||||
uint_t cleanup_idx;
|
||||
|
@ -811,7 +810,8 @@ remove_provider_from_array(kcf_provider_desc_t *p1, kcf_provider_desc_t *p2)
|
|||
* descriptors (kcf_provider_desc_t) attached to a logical provider.
|
||||
*/
|
||||
static void
|
||||
process_logical_providers(crypto_provider_info_t *info, kcf_provider_desc_t *hp)
|
||||
process_logical_providers(const crypto_provider_info_t *info,
|
||||
kcf_provider_desc_t *hp)
|
||||
{
|
||||
kcf_provider_desc_t *lp;
|
||||
crypto_provider_id_t handle;
|
||||
|
|
|
@ -146,12 +146,12 @@ static int nvlist_add_common(nvlist_t *nvl, const char *name, data_type_t type,
|
|||
((i_nvp_t *)((size_t)(nvp) - offsetof(i_nvp_t, nvi_nvp)))
|
||||
|
||||
#ifdef _KERNEL
|
||||
int nvpair_max_recursion = 20;
|
||||
static const int nvpair_max_recursion = 20;
|
||||
#else
|
||||
int nvpair_max_recursion = 100;
|
||||
static const int nvpair_max_recursion = 100;
|
||||
#endif
|
||||
|
||||
uint64_t nvlist_hashtable_init_size = (1 << 4);
|
||||
static const uint64_t nvlist_hashtable_init_size = (1 << 4);
|
||||
|
||||
int
|
||||
nv_alloc_init(nv_alloc_t *nva, const nv_alloc_ops_t *nvo, /* args */ ...)
|
||||
|
|
|
@ -100,7 +100,7 @@ nv_fixed_reset(nv_alloc_t *nva)
|
|||
nvb->nvb_cur = (uintptr_t)&nvb[1];
|
||||
}
|
||||
|
||||
const nv_alloc_ops_t nv_fixed_ops_def = {
|
||||
static const nv_alloc_ops_t nv_fixed_ops_def = {
|
||||
.nv_ao_init = nv_fixed_init,
|
||||
.nv_ao_fini = NULL,
|
||||
.nv_ao_alloc = nv_fixed_alloc,
|
||||
|
@ -108,7 +108,7 @@ const nv_alloc_ops_t nv_fixed_ops_def = {
|
|||
.nv_ao_reset = nv_fixed_reset
|
||||
};
|
||||
|
||||
const nv_alloc_ops_t *nv_fixed_ops = &nv_fixed_ops_def;
|
||||
const nv_alloc_ops_t *const nv_fixed_ops = &nv_fixed_ops_def;
|
||||
|
||||
#if defined(_KERNEL)
|
||||
EXPORT_SYMBOL(nv_fixed_ops);
|
||||
|
|
|
@ -52,7 +52,7 @@ nv_free_spl(nv_alloc_t *nva, void *buf, size_t size)
|
|||
kmem_free(buf, size);
|
||||
}
|
||||
|
||||
const nv_alloc_ops_t spl_sleep_ops_def = {
|
||||
static const nv_alloc_ops_t spl_sleep_ops_def = {
|
||||
.nv_ao_init = NULL,
|
||||
.nv_ao_fini = NULL,
|
||||
.nv_ao_alloc = nv_alloc_sleep_spl,
|
||||
|
@ -60,7 +60,7 @@ const nv_alloc_ops_t spl_sleep_ops_def = {
|
|||
.nv_ao_reset = NULL
|
||||
};
|
||||
|
||||
const nv_alloc_ops_t spl_pushpage_ops_def = {
|
||||
static const nv_alloc_ops_t spl_pushpage_ops_def = {
|
||||
.nv_ao_init = NULL,
|
||||
.nv_ao_fini = NULL,
|
||||
.nv_ao_alloc = nv_alloc_pushpage_spl,
|
||||
|
@ -68,7 +68,7 @@ const nv_alloc_ops_t spl_pushpage_ops_def = {
|
|||
.nv_ao_reset = NULL
|
||||
};
|
||||
|
||||
const nv_alloc_ops_t spl_nosleep_ops_def = {
|
||||
static const nv_alloc_ops_t spl_nosleep_ops_def = {
|
||||
.nv_ao_init = NULL,
|
||||
.nv_ao_fini = NULL,
|
||||
.nv_ao_alloc = nv_alloc_nosleep_spl,
|
||||
|
@ -76,21 +76,21 @@ const nv_alloc_ops_t spl_nosleep_ops_def = {
|
|||
.nv_ao_reset = NULL
|
||||
};
|
||||
|
||||
nv_alloc_t nv_alloc_sleep_def = {
|
||||
static nv_alloc_t nv_alloc_sleep_def = {
|
||||
&spl_sleep_ops_def,
|
||||
NULL
|
||||
};
|
||||
|
||||
nv_alloc_t nv_alloc_pushpage_def = {
|
||||
static nv_alloc_t nv_alloc_pushpage_def = {
|
||||
&spl_pushpage_ops_def,
|
||||
NULL
|
||||
};
|
||||
|
||||
nv_alloc_t nv_alloc_nosleep_def = {
|
||||
static nv_alloc_t nv_alloc_nosleep_def = {
|
||||
&spl_nosleep_ops_def,
|
||||
NULL
|
||||
};
|
||||
|
||||
nv_alloc_t *nv_alloc_sleep = &nv_alloc_sleep_def;
|
||||
nv_alloc_t *nv_alloc_pushpage = &nv_alloc_pushpage_def;
|
||||
nv_alloc_t *nv_alloc_nosleep = &nv_alloc_nosleep_def;
|
||||
nv_alloc_t *const nv_alloc_sleep = &nv_alloc_sleep_def;
|
||||
nv_alloc_t *const nv_alloc_pushpage = &nv_alloc_pushpage_def;
|
||||
nv_alloc_t *const nv_alloc_nosleep = &nv_alloc_nosleep_def;
|
||||
|
|
|
@ -93,7 +93,7 @@ struct {
|
|||
* of multi-page linear ABDs are expensive operations due to KVA mapping and
|
||||
* unmapping, and with time they cause KVA fragmentations.
|
||||
*/
|
||||
size_t zfs_abd_scatter_min_size = PAGE_SIZE + 1;
|
||||
static size_t zfs_abd_scatter_min_size = PAGE_SIZE + 1;
|
||||
|
||||
#if defined(_KERNEL)
|
||||
SYSCTL_DECL(_vfs_zfs);
|
||||
|
|
|
@ -198,7 +198,7 @@ zfs_crypto_dispatch(freebsd_crypt_session_t *session, struct cryptop *crp)
|
|||
static void
|
||||
freebsd_crypt_uio_debug_log(boolean_t encrypt,
|
||||
freebsd_crypt_session_t *input_sessionp,
|
||||
struct zio_crypt_info *c_info,
|
||||
const struct zio_crypt_info *c_info,
|
||||
zfs_uio_t *data_uio,
|
||||
crypto_key_t *key,
|
||||
uint8_t *ivbuf,
|
||||
|
@ -241,7 +241,7 @@ freebsd_crypt_uio_debug_log(boolean_t encrypt,
|
|||
#if __FreeBSD_version >= 1300087
|
||||
int
|
||||
freebsd_crypt_newsession(freebsd_crypt_session_t *sessp,
|
||||
struct zio_crypt_info *c_info, crypto_key_t *key)
|
||||
const struct zio_crypt_info *c_info, crypto_key_t *key)
|
||||
{
|
||||
struct crypto_session_params csp;
|
||||
int error = 0;
|
||||
|
@ -322,7 +322,7 @@ bad:
|
|||
int
|
||||
freebsd_crypt_uio(boolean_t encrypt,
|
||||
freebsd_crypt_session_t *input_sessionp,
|
||||
struct zio_crypt_info *c_info,
|
||||
const struct zio_crypt_info *c_info,
|
||||
zfs_uio_t *data_uio,
|
||||
crypto_key_t *key,
|
||||
uint8_t *ivbuf,
|
||||
|
@ -382,7 +382,7 @@ out:
|
|||
#else
|
||||
int
|
||||
freebsd_crypt_newsession(freebsd_crypt_session_t *sessp,
|
||||
struct zio_crypt_info *c_info, crypto_key_t *key)
|
||||
const struct zio_crypt_info *c_info, crypto_key_t *key)
|
||||
{
|
||||
struct cryptoini cria, crie, *crip;
|
||||
struct enc_xform *xform;
|
||||
|
@ -492,7 +492,7 @@ bad:
|
|||
int
|
||||
freebsd_crypt_uio(boolean_t encrypt,
|
||||
freebsd_crypt_session_t *input_sessionp,
|
||||
struct zio_crypt_info *c_info,
|
||||
const struct zio_crypt_info *c_info,
|
||||
zfs_uio_t *data_uio,
|
||||
crypto_key_t *key,
|
||||
uint8_t *ivbuf,
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
|
||||
static taskq_t *vdev_file_taskq;
|
||||
|
||||
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;
|
||||
|
||||
void
|
||||
vdev_file_init(void)
|
||||
|
|
|
@ -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 = {
|
||||
zfs_ace_v0_get_mask,
|
||||
zfs_ace_v0_set_mask,
|
||||
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 = {
|
||||
zfs_ace_fuid_get_mask,
|
||||
zfs_ace_fuid_set_mask,
|
||||
zfs_ace_fuid_get_flags,
|
||||
|
|
|
@ -33,11 +33,11 @@ typedef struct zfs_dbgmsg {
|
|||
char zdm_msg[1]; /* variable length allocation */
|
||||
} zfs_dbgmsg_t;
|
||||
|
||||
list_t zfs_dbgmsgs;
|
||||
int zfs_dbgmsg_size = 0;
|
||||
kmutex_t zfs_dbgmsgs_lock;
|
||||
static list_t zfs_dbgmsgs;
|
||||
static int zfs_dbgmsg_size = 0;
|
||||
static kmutex_t zfs_dbgmsgs_lock;
|
||||
int zfs_dbgmsg_maxsize = 4<<20; /* 4MB */
|
||||
kstat_t *zfs_dbgmsg_kstat;
|
||||
static kstat_t *zfs_dbgmsg_kstat;
|
||||
|
||||
/*
|
||||
* Internal ZFS debug messages are enabled by default.
|
||||
|
@ -51,7 +51,7 @@ kstat_t *zfs_dbgmsg_kstat;
|
|||
* # Disable the kernel debug message log.
|
||||
* sysctl vfs.zfs.dbgmsg_enable=0
|
||||
*/
|
||||
int zfs_dbgmsg_enable = 1;
|
||||
int zfs_dbgmsg_enable = B_TRUE;
|
||||
|
||||
static int
|
||||
zfs_dbgmsg_headers(char *buf, size_t size)
|
||||
|
|
|
@ -185,13 +185,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;
|
||||
|
||||
/*
|
||||
* Set to a nonzero value to cause zio_do_crypt_uio() to fail 1/this many
|
||||
* calls, to test decryption error handling code paths.
|
||||
*/
|
||||
uint64_t zio_decrypt_fail_fraction = 0;
|
||||
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 */
|
||||
|
@ -199,7 +193,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"},
|
||||
|
@ -237,7 +231,7 @@ zio_crypt_key_init(uint64_t crypt, zio_crypt_key_t *key)
|
|||
int ret;
|
||||
crypto_mechanism_t mech __unused;
|
||||
uint_t keydata_len;
|
||||
zio_crypt_info_t *ci = NULL;
|
||||
const zio_crypt_info_t *ci = NULL;
|
||||
|
||||
ASSERT3P(key, !=, NULL);
|
||||
ASSERT3U(crypt, <, ZIO_CRYPT_FUNCTIONS);
|
||||
|
@ -406,16 +400,13 @@ zio_do_crypt_uio_opencrypto(boolean_t encrypt, freebsd_crypt_session_t *sess,
|
|||
uint64_t crypt, crypto_key_t *key, uint8_t *ivbuf, uint_t datalen,
|
||||
zfs_uio_t *uio, uint_t auth_len)
|
||||
{
|
||||
zio_crypt_info_t *ci;
|
||||
int ret;
|
||||
|
||||
ci = &zio_crypt_table[crypt];
|
||||
const zio_crypt_info_t *ci = &zio_crypt_table[crypt];
|
||||
if (ci->ci_crypt_type != ZC_TYPE_GCM &&
|
||||
ci->ci_crypt_type != ZC_TYPE_CCM)
|
||||
return (ENOTSUP);
|
||||
|
||||
|
||||
ret = freebsd_crypt_uio(encrypt, sess, ci, uio, key, ivbuf,
|
||||
int ret = freebsd_crypt_uio(encrypt, sess, ci, uio, key, ivbuf,
|
||||
datalen, auth_len);
|
||||
if (ret != 0) {
|
||||
#ifdef FCRYPTO_DEBUG
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -200,7 +200,7 @@ typedef enum {
|
|||
#define I_ U8_ILLEGAL_CHAR
|
||||
#define O_ U8_OUT_OF_RANGE_CHAR
|
||||
|
||||
const int8_t u8_number_of_bytes[0x100] = {
|
||||
static const int8_t u8_number_of_bytes[0x100] = {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
|
@ -238,7 +238,7 @@ const int8_t u8_number_of_bytes[0x100] = {
|
|||
#undef I_
|
||||
#undef O_
|
||||
|
||||
const uint8_t u8_valid_min_2nd_byte[0x100] = {
|
||||
static const uint8_t u8_valid_min_2nd_byte[0x100] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -280,7 +280,7 @@ const uint8_t u8_valid_min_2nd_byte[0x100] = {
|
|||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
const uint8_t u8_valid_max_2nd_byte[0x100] = {
|
||||
static const uint8_t u8_valid_max_2nd_byte[0x100] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
|
|
@ -139,11 +139,7 @@ static const uchar_t remaining_bytes_tbl[0x100] = {
|
|||
* the first byte of a UTF-8 character. Index is remaining bytes at above of
|
||||
* the character.
|
||||
*/
|
||||
#ifdef _KERNEL
|
||||
const uchar_t u8_masks_tbl[6] = { 0x00, 0x1f, 0x0f, 0x07, 0x03, 0x01 };
|
||||
#else
|
||||
static const uchar_t u8_masks_tbl[6] = { 0x00, 0x1f, 0x0f, 0x07, 0x03, 0x01 };
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* The following two vectors are to provide valid minimum and
|
||||
|
|
|
@ -325,7 +325,7 @@ zfeature_register(spa_feature_t fid, const char *guid, const char *name,
|
|||
const struct zfs_mod_supported_features *sfeatures)
|
||||
{
|
||||
zfeature_info_t *feature = &spa_feature_table[fid];
|
||||
static spa_feature_t nodeps[] = { SPA_FEATURE_NONE };
|
||||
static const spa_feature_t nodeps[] = { SPA_FEATURE_NONE };
|
||||
|
||||
ASSERT(name != NULL);
|
||||
ASSERT(desc != NULL);
|
||||
|
|
|
@ -158,13 +158,11 @@ static zfs_version_spa_map_t zfs_version_table[] = {
|
|||
int
|
||||
zfs_zpl_version_map(int spa_version)
|
||||
{
|
||||
int i;
|
||||
int version = -1;
|
||||
|
||||
for (i = 0; zfs_version_table[i].version_spa; i++) {
|
||||
for (int i = 0; zfs_version_table[i].version_spa; i++)
|
||||
if (spa_version >= zfs_version_table[i].version_spa)
|
||||
version = zfs_version_table[i].version_zpl;
|
||||
}
|
||||
|
||||
return (version);
|
||||
}
|
||||
|
@ -176,22 +174,18 @@ zfs_zpl_version_map(int spa_version)
|
|||
int
|
||||
zfs_spa_version_map(int zpl_version)
|
||||
{
|
||||
int i;
|
||||
int version = -1;
|
||||
|
||||
for (i = 0; zfs_version_table[i].version_zpl; i++) {
|
||||
for (int i = 0; zfs_version_table[i].version_zpl; i++)
|
||||
if (zfs_version_table[i].version_zpl >= zpl_version)
|
||||
return (zfs_version_table[i].version_spa);
|
||||
}
|
||||
|
||||
return (version);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the table of legacy internal event names; it should not be modified.
|
||||
* The internal events are now stored in the history log as strings.
|
||||
*/
|
||||
const char *zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS] = {
|
||||
const char *const zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS] = {
|
||||
"invalid event",
|
||||
"pool create",
|
||||
"vdev add",
|
||||
|
@ -243,9 +237,7 @@ zfs_dataset_name_hidden(const char *name)
|
|||
* internal datasets (which have a $ in their name), and
|
||||
* temporary datasets (which have a % in their name).
|
||||
*/
|
||||
if (strchr(name, '$') != NULL)
|
||||
return (B_TRUE);
|
||||
if (strchr(name, '%') != NULL)
|
||||
if (strpbrk(name, "$%") != NULL)
|
||||
return (B_TRUE);
|
||||
if (!INGLOBALZONE(curproc) && !zone_dataset_visible(name, NULL))
|
||||
return (B_TRUE);
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "zfs_deleg.h"
|
||||
#include "zfs_namecheck.h"
|
||||
|
||||
zfs_deleg_perm_tab_t zfs_deleg_perm_tab[] = {
|
||||
const zfs_deleg_perm_tab_t zfs_deleg_perm_tab[] = {
|
||||
{ZFS_DELEG_PERM_ALLOW},
|
||||
{ZFS_DELEG_PERM_BOOKMARK},
|
||||
{ZFS_DELEG_PERM_CLONE},
|
||||
|
@ -89,15 +89,12 @@ zfs_valid_permission_name(const char *perm)
|
|||
const char *
|
||||
zfs_deleg_canonicalize_perm(const char *perm)
|
||||
{
|
||||
int i;
|
||||
zfs_prop_t prop;
|
||||
|
||||
for (i = 0; zfs_deleg_perm_tab[i].z_perm != NULL; i++) {
|
||||
for (int i = 0; zfs_deleg_perm_tab[i].z_perm != NULL; i++) {
|
||||
if (strcmp(perm, zfs_deleg_perm_tab[i].z_perm) == 0)
|
||||
return (perm);
|
||||
}
|
||||
|
||||
prop = zfs_name_to_prop(perm);
|
||||
zfs_prop_t prop = zfs_name_to_prop(perm);
|
||||
if (prop != ZPROP_INVAL && zfs_prop_delegatable(prop))
|
||||
return (zfs_prop_to_name(prop));
|
||||
return (NULL);
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
static zprop_desc_t zfs_prop_table[ZFS_NUM_PROPS];
|
||||
|
||||
/* Note this is indexed by zfs_userquota_prop_t, keep the order the same */
|
||||
const char *zfs_userquota_prop_prefixes[] = {
|
||||
const char *const zfs_userquota_prop_prefixes[] = {
|
||||
"userused@",
|
||||
"userquota@",
|
||||
"groupused@",
|
||||
|
|
|
@ -352,7 +352,7 @@ static list_t arc_evict_waiters;
|
|||
* can still happen, even during the potentially long time that arc_size is
|
||||
* more than arc_c.
|
||||
*/
|
||||
int zfs_arc_eviction_pct = 200;
|
||||
static int zfs_arc_eviction_pct = 200;
|
||||
|
||||
/*
|
||||
* The number of headers to evict in arc_evict_state_impl() before
|
||||
|
@ -361,7 +361,7 @@ int zfs_arc_eviction_pct = 200;
|
|||
* oldest header in the arc state), but comes with higher overhead
|
||||
* (i.e. more invocations of arc_evict_state_impl()).
|
||||
*/
|
||||
int zfs_arc_evict_batch_limit = 10;
|
||||
static int zfs_arc_evict_batch_limit = 10;
|
||||
|
||||
/* number of seconds before growing cache again */
|
||||
int arc_grow_retry = 5;
|
||||
|
@ -369,13 +369,13 @@ int arc_grow_retry = 5;
|
|||
/*
|
||||
* Minimum time between calls to arc_kmem_reap_soon().
|
||||
*/
|
||||
int arc_kmem_cache_reap_retry_ms = 1000;
|
||||
static const int arc_kmem_cache_reap_retry_ms = 1000;
|
||||
|
||||
/* shift of arc_c for calculating overflow limit in arc_get_data_impl */
|
||||
int zfs_arc_overflow_shift = 8;
|
||||
static int zfs_arc_overflow_shift = 8;
|
||||
|
||||
/* shift of arc_c for calculating both min and max arc_p */
|
||||
int arc_p_min_shift = 4;
|
||||
static int arc_p_min_shift = 4;
|
||||
|
||||
/* log2(fraction of arc to reclaim) */
|
||||
int arc_shrink_shift = 7;
|
||||
|
@ -421,19 +421,22 @@ unsigned long zfs_arc_max = 0;
|
|||
unsigned long zfs_arc_min = 0;
|
||||
unsigned long zfs_arc_meta_limit = 0;
|
||||
unsigned long zfs_arc_meta_min = 0;
|
||||
unsigned long zfs_arc_dnode_limit = 0;
|
||||
unsigned long zfs_arc_dnode_reduce_percent = 10;
|
||||
int zfs_arc_grow_retry = 0;
|
||||
int zfs_arc_shrink_shift = 0;
|
||||
int zfs_arc_p_min_shift = 0;
|
||||
static unsigned long zfs_arc_dnode_limit = 0;
|
||||
static unsigned long zfs_arc_dnode_reduce_percent = 10;
|
||||
static int zfs_arc_grow_retry = 0;
|
||||
static int zfs_arc_shrink_shift = 0;
|
||||
static int zfs_arc_p_min_shift = 0;
|
||||
int zfs_arc_average_blocksize = 8 * 1024; /* 8KB */
|
||||
|
||||
/*
|
||||
* ARC dirty data constraints for arc_tempreserve_space() throttle.
|
||||
* ARC dirty data constraints for arc_tempreserve_space() throttle:
|
||||
* * total dirty data limit
|
||||
* * anon block dirty limit
|
||||
* * each pool's anon allowance
|
||||
*/
|
||||
unsigned long zfs_arc_dirty_limit_percent = 50; /* total dirty data limit */
|
||||
unsigned long zfs_arc_anon_limit_percent = 25; /* anon block dirty limit */
|
||||
unsigned long zfs_arc_pool_dirty_percent = 20; /* each pool's anon allowance */
|
||||
static const unsigned long zfs_arc_dirty_limit_percent = 50;
|
||||
static const unsigned long zfs_arc_anon_limit_percent = 25;
|
||||
static const unsigned long zfs_arc_pool_dirty_percent = 20;
|
||||
|
||||
/*
|
||||
* Enable or disable compressed arc buffers.
|
||||
|
@ -444,24 +447,24 @@ int zfs_compressed_arc_enabled = B_TRUE;
|
|||
* ARC will evict meta buffers that exceed arc_meta_limit. This
|
||||
* tunable make arc_meta_limit adjustable for different workloads.
|
||||
*/
|
||||
unsigned long zfs_arc_meta_limit_percent = 75;
|
||||
static unsigned long zfs_arc_meta_limit_percent = 75;
|
||||
|
||||
/*
|
||||
* Percentage that can be consumed by dnodes of ARC meta buffers.
|
||||
*/
|
||||
unsigned long zfs_arc_dnode_limit_percent = 10;
|
||||
static unsigned long zfs_arc_dnode_limit_percent = 10;
|
||||
|
||||
/*
|
||||
* These tunables are Linux specific
|
||||
* These tunables are Linux-specific
|
||||
*/
|
||||
unsigned long zfs_arc_sys_free = 0;
|
||||
int zfs_arc_min_prefetch_ms = 0;
|
||||
int zfs_arc_min_prescient_prefetch_ms = 0;
|
||||
int zfs_arc_p_dampener_disable = 1;
|
||||
int zfs_arc_meta_prune = 10000;
|
||||
int zfs_arc_meta_strategy = ARC_STRATEGY_META_BALANCED;
|
||||
int zfs_arc_meta_adjust_restarts = 4096;
|
||||
int zfs_arc_lotsfree_percent = 10;
|
||||
static unsigned long zfs_arc_sys_free = 0;
|
||||
static int zfs_arc_min_prefetch_ms = 0;
|
||||
static int zfs_arc_min_prescient_prefetch_ms = 0;
|
||||
static int zfs_arc_p_dampener_disable = 1;
|
||||
static int zfs_arc_meta_prune = 10000;
|
||||
static int zfs_arc_meta_strategy = ARC_STRATEGY_META_BALANCED;
|
||||
static int zfs_arc_meta_adjust_restarts = 4096;
|
||||
static int zfs_arc_lotsfree_percent = 10;
|
||||
|
||||
/*
|
||||
* Number of arc_prune threads
|
||||
|
@ -651,7 +654,7 @@ arc_sums_t arc_sums;
|
|||
ARCSTAT(stat) = x; \
|
||||
} while (0)
|
||||
|
||||
kstat_t *arc_ksp;
|
||||
static kstat_t *arc_ksp;
|
||||
|
||||
/*
|
||||
* There are several ARC variables that are critical to export as kstats --
|
||||
|
@ -785,7 +788,7 @@ unsigned long l2arc_feed_min_ms = L2ARC_FEED_MIN_MS; /* min interval msecs */
|
|||
int l2arc_noprefetch = B_TRUE; /* don't cache prefetch bufs */
|
||||
int l2arc_feed_again = B_TRUE; /* turbo warmup */
|
||||
int l2arc_norw = B_FALSE; /* no reads during writes */
|
||||
int l2arc_meta_percent = 33; /* limit on headers size */
|
||||
static int l2arc_meta_percent = 33; /* limit on headers size */
|
||||
|
||||
/*
|
||||
* L2ARC Internals
|
||||
|
@ -886,7 +889,7 @@ int l2arc_exclude_special = 0;
|
|||
* l2arc_mfuonly : A ZFS module parameter that controls whether only MFU
|
||||
* metadata and data are cached from ARC into L2ARC.
|
||||
*/
|
||||
int l2arc_mfuonly = 0;
|
||||
static int l2arc_mfuonly = 0;
|
||||
|
||||
/*
|
||||
* L2ARC TRIM
|
||||
|
@ -903,7 +906,7 @@ int l2arc_mfuonly = 0;
|
|||
* will vary depending of how well the specific device handles
|
||||
* these commands.
|
||||
*/
|
||||
unsigned long l2arc_trim_ahead = 0;
|
||||
static unsigned long l2arc_trim_ahead = 0;
|
||||
|
||||
/*
|
||||
* Performance tuning of L2ARC persistence:
|
||||
|
@ -918,8 +921,8 @@ unsigned long l2arc_trim_ahead = 0;
|
|||
* data. In this case do not write log blocks in L2ARC in order
|
||||
* not to waste space.
|
||||
*/
|
||||
int l2arc_rebuild_enabled = B_TRUE;
|
||||
unsigned long l2arc_rebuild_blocks_min_l2size = 1024 * 1024 * 1024;
|
||||
static int l2arc_rebuild_enabled = B_TRUE;
|
||||
static unsigned long l2arc_rebuild_blocks_min_l2size = 1024 * 1024 * 1024;
|
||||
|
||||
/* L2ARC persistence rebuild control routines. */
|
||||
void l2arc_rebuild_vdev(vdev_t *vd, boolean_t reopen);
|
||||
|
@ -4810,8 +4813,6 @@ arc_kmem_reap_soon(void)
|
|||
size_t i;
|
||||
kmem_cache_t *prev_cache = NULL;
|
||||
kmem_cache_t *prev_data_cache = NULL;
|
||||
extern kmem_cache_t *zio_buf_cache[];
|
||||
extern kmem_cache_t *zio_data_buf_cache[];
|
||||
|
||||
#ifdef _KERNEL
|
||||
if ((aggsum_compare(&arc_sums.arcstat_meta_used,
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#include <sys/wmsum.h>
|
||||
#include <sys/vdev_impl.h>
|
||||
|
||||
kstat_t *dbuf_ksp;
|
||||
static kstat_t *dbuf_ksp;
|
||||
|
||||
typedef struct dbuf_stats {
|
||||
/*
|
||||
|
@ -225,12 +225,12 @@ typedef struct dbuf_cache {
|
|||
dbuf_cache_t dbuf_caches[DB_CACHE_MAX];
|
||||
|
||||
/* Size limits for the caches */
|
||||
unsigned long dbuf_cache_max_bytes = ULONG_MAX;
|
||||
unsigned long dbuf_metadata_cache_max_bytes = ULONG_MAX;
|
||||
static unsigned long dbuf_cache_max_bytes = ULONG_MAX;
|
||||
static unsigned long dbuf_metadata_cache_max_bytes = ULONG_MAX;
|
||||
|
||||
/* Set the default sizes of the caches to log2 fraction of arc size */
|
||||
int dbuf_cache_shift = 5;
|
||||
int dbuf_metadata_cache_shift = 6;
|
||||
static int dbuf_cache_shift = 5;
|
||||
static int dbuf_metadata_cache_shift = 6;
|
||||
|
||||
static unsigned long dbuf_cache_target_bytes(void);
|
||||
static unsigned long dbuf_metadata_cache_target_bytes(void);
|
||||
|
@ -277,8 +277,8 @@ static unsigned long dbuf_metadata_cache_target_bytes(void);
|
|||
/*
|
||||
* The percentage above and below the maximum cache size.
|
||||
*/
|
||||
uint_t dbuf_cache_hiwater_pct = 10;
|
||||
uint_t dbuf_cache_lowater_pct = 10;
|
||||
static uint_t dbuf_cache_hiwater_pct = 10;
|
||||
static uint_t dbuf_cache_lowater_pct = 10;
|
||||
|
||||
static int
|
||||
dbuf_cons(void *vdb, void *unused, int kmflag)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue