Skip to content

Commit

Permalink
module/*.ko: prune .data, global .rodata
Browse files Browse the repository at this point in the history
final zfs.ko filters:

nabijaczleweli@tarta:~/store/code/zfs$ find module/ -name '*.ko' -and ! -name znvpair.ko -and ! -name zzstd.ko -and ! -name zunicode.ko ! -name spl.ko ! -name zavl.ko ! -name zlua.ko -and ! -name icp.ko -and ! -name zcommon.ko -exec  objdump -tj .data {} \; | grep -vEe '_stats' -e '_kstat' -e zfs_vdev_mirror_rotating_inc -e zfs_vdev_mirror_rotating_seek_inc -e zfs_vdev_mirror_rotating_seek_offset -e zfs_vdev_mirror_non_rotating_inc -e zfs_vdev_mirror_non_rotating_seek_inc -e spa_config_generation -e zfs_vdev_raidz_impl -e vdev_raidz_fastest_impl -e sel_impl -e zfs_vnops_read_chunk_size -e inject_next_id -e arc_shrinker -e zfs_misc$ -e 'acl_rel_(head|tail)$' -e 'metaslab_(aliquot|bias_enabled|debug_load|debug_unload|df_alloc_threshold|df_free_pct|df_max_search|df_use_largest_segment|force_ganging|fragmentation_factor_enabled|lba_weighting_enabled|load_pct|preload_enabled|preload_limit|unload_delay|unload_delay_ms)' -e 'zfs_metaslab_(find_max_tries|fragmentation_threshold|max_size_cache_sec|mem_limit|segment_weight_enabled|sm_blksz_no_log|sm_blksz_with_log|switch_threshold|try_hard_before_gang)' -e 'zfs_mg_(fragmentation_threshold|noalloc_threshold)' -e 'zvol_(major|request_sync|prefetch_bytes|max_discard_blocks|threads|taskq|ida)$' -e zfs_vdev_async_write_max_active -e 'zfs_initialize_(value|chunk_size)' -e zfs_zevent_len_max -e ratelimit_dropped -e 'zevent_(cv|eid|flags|len_cur|list|lock|waiters)' -e 'zfs_vdev_(read|write)_gap_limit' -e 'zfs_vdev_aggregate_trim' -e 'zfs_vdev_aggregation_limit(_non_rotating)?' -e 'zfs_vdev_async_read_m(ax|in)_active' -e 'zfs_vdev_async_write_active_m(ax|in)_dirty_percent' -e 'zfs_vdev_async_write_m(ax|in)_active' -e 'zfs_vdev_def_queue_depth' -e 'zfs_vdev_initializing_m(ax|in)_active' -e 'zfs_vdev_max_active' -e 'zfs_vdev_nia_(credit|delay)' -e 'zfs_vdev_queue_depth_pct' -e 'zfs_vdev_rebuild_m(ax|in)_active' -e 'zfs_vdev_removal_m(ax|in)_active' -e 'zfs_vdev_scrub_m(ax|in)_active' -e 'zfs_vdev_sync_read_m(ax|in)_active' -e 'zfs_vdev_sync_write_m(ax|in)_active' -e 'zfs_vdev_trim_m(ax|in)_active' -e zfs_dbgmsg_enable -e zfs_fallocate_reserve_percent -e 'zfs_trim_extent_bytes_m(ax|in)' -e zfs_trim_metaslab_skip -e zfs_trim_queue_limit -e zfs_trim_txg_batch -e zfs_override_estimate_recordsize -e zfs_send_corrupt_data -e 'zfs_send_no_prefetch_queue_(ff|length)' -e 'zfs_send_queue_(ff|length)' -e zfs_send_unmodified_spill_blocks -e ARC_anon -e 'arc_evict_(count|lock|needed|waiters|zthr)' -e arc_grow_retry -e arc_growtime -e arc_ksp -e ARC_l2c_only -e arc_lotsfree_percent -e ARC_mfu -e ARC_mfu_ghost -e arc_min_prefetch_ms -e arc_min_prescient_prefetch_ms -e 'ARC_mru(_ghost)?' -e arc_no_grow_shift -e arc_p_min_shift -e 'arc_prune_(list|mtx)' -e arc_prune_taskq -e arc_reap_zthr -e arc_shrink_shift -e arc_stats -e arc_sums -e arc_warm -e l2arc_exclude_special -e l2arc_mfuonly -e 'l2arc_rebuild_(blocks_min_l2size|enabled)' -e l2arc_trim_ahead -e zfs_arc_average_blocksize -e 'zfs_arc_dnode_limit(_percent)?' -e zfs_arc_dnode_reduce_percent -e zfs_arc_evict_batch_limit -e zfs_arc_eviction_pct -e zfs_arc_grow_retry -e zfs_arc_lotsfree_percent -e zfs_arc_max -e 'zfs_arc_meta_(adjust_restarts|limit|limit_percent|min|prune|strategy)' -e zfs_arc_min -e zfs_arc_min_prefetch_ms -e zfs_arc_min_prescient_prefetch_ms -e zfs_arc_overflow_shift -e zfs_arc_p_dampener_disable -e zfs_arc_p_min_shift -e zfs_arc_pc_percent -e zfs_arc_shrink_shift -e zfs_arc_sys_free -e zfs_compressed_arc_enabled -e vdev_validate_skip -e zfs_checksum_events_per_second -e zfs_embedded_slog_min_ms -e zfs_nocacheflush -e zfs_scan_ignore_errors -e zfs_slow_io_events_per_second -e 'zfs_vdev_default_ms_(count|shift)' -e zfs_vdev_dtl_sm_blksz -e 'zfs_vdev_m(ax|in)_auto_ashift' -e zfs_vdev_min_ms_count -e zfs_vdev_ms_count_limit -e zfs_vdev_standard_sm_blksz -e 'l2arc_feed_(again|min_ms|secs)' -e 'l2arc_headroom(_boost)?' -e l2arc_meta_percent -e l2arc_noprefetch -e l2arc_norw -e 'l2arc_write_(boost|max)?' -e zfs_keep_log_spacemaps_at_export -e zfs_max_log_walking -e zfs_max_logsm_summary_length -e zfs_min_metaslabs_to_flush -e 'zfs_unflushed_

nabijaczleweli@tarta:~/store/code/zfs$ find module/ -name '*.ko' -and ! -name znvpair.ko -and ! -name zzstd.ko -and ! -name zunicode.ko ! -name spl.ko ! -name zavl.ko ! -name zlua.ko -and ! -name icp.ko -and ! -name zcommon.ko -exec  objdump -tj .rodata {} \; | grep -v ' l ' | grep -vEe vdev_raidz_avx512f_impl -e zpl_ops_snapdir -e 'vdev_raidz_(pow|log)2' -e rt_btree_ops -e vdev_raidz_vsd_ops -e zpl_ops_shares -e zpl_dir_inode_operations -e vdev_raidz_ssse3_impl -e zio_compress_table -e dmu_ot_byteswap -e zpl_dir_file_operations -e zio_crypt_table -e zio_type_name -e vdev_raidz_.+_impl -e  zvol_replay_vector -e  zpl_symlink_inode_operations  -e vdev_hole_ops -e vdev_replacing_ops -e vdev_root_ops -e zpl_super_operations -e zpl_inode_operations -e zfs_metaslab_ops -e zpl_ops_root -e zpl_fops_root -e recv_clone_name -e zpl_dentry_operations -e vdev_disk_ops -e 'raidz_(gen|rec)_name' -e dmu_ot -e zpl_fops_shares -e zpl_fops_shares -e vdev_file_ops -e zfs_attr_table -e zpl_address_space_operations -e zpl_fops_snapdir -e
ddt_zap_ops -e zpl_file_operations -e zpl_special_inode_operations -e vdev_missing_ops -e vdev_draid_spare_ops -e zio_checksum_table -e gf_clmul_mod_lt -e zfs_replay_vector -e zpl_export_operations -e vdev_spare_ops -e vdev_indirect_ops -e vdev_raidz_ops -e vdev_draid_ops -e vdev_mirror_ops
  • Loading branch information
nabijaczleweli committed Dec 22, 2021
1 parent bbe819a commit 1625ed1
Show file tree
Hide file tree
Showing 150 changed files with 671 additions and 789 deletions.
13 changes: 6 additions & 7 deletions cmd/zhack/zhack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/ztest/ztest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/libzfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions include/os/freebsd/zfs/sys/freebsd_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion include/os/freebsd/zfs/sys/zfs_context_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)); \
Expand Down
3 changes: 1 addition & 2 deletions include/os/freebsd/zfs/sys/zfs_znode_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion include/os/linux/spl/rpc/xdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ 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 */
Expand Down
1 change: 0 additions & 1 deletion include/os/linux/spl/sys/sysmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
#endif

/* Missing globals */
extern char spl_gitrev[64];
extern unsigned long spl_hostid;

/* Missing misc functions */
Expand Down
2 changes: 1 addition & 1 deletion include/os/linux/spl/sys/taskq.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ 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);
Expand Down
3 changes: 1 addition & 2 deletions include/os/linux/zfs/sys/zfs_znode_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion include/os/linux/zfs/sys/zpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/sys/crypto/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion include/sys/dmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down
2 changes: 1 addition & 1 deletion include/sys/dmu_recv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions include/sys/dsl_dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
extern "C" {
#endif

extern int zfs_allow_redacted_dataset_mount;
struct dsl_dataset;
struct dsl_dir;
struct dsl_pool;
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion include/sys/dsl_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/sys/fs/zfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ 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
Expand Down
4 changes: 2 additions & 2 deletions include/sys/metaslab.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 **);
Expand Down Expand Up @@ -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 *);
Expand Down
2 changes: 1 addition & 1 deletion include/sys/metaslab_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions include/sys/range_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -278,10 +278,10 @@ 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,
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);
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion include/sys/sa.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ 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 *);
Expand Down
3 changes: 3 additions & 0 deletions include/sys/spa.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/sys/spa_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions include/sys/vdev_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions include/sys/vdev_raidz_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/sys/zfs_acl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion include/sys/zfs_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion include/sys/zfs_ioctl_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down
3 changes: 1 addition & 2 deletions include/sys/zfs_sa.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions include/sys/zil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion include/sys/zio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/sys/zio_crypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions include/sys/zvol_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 1625ed1

Please sign in to comment.