diff options
38 files changed, 138 insertions, 127 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index d3a68171a..13994c3bb 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -3024,7 +3024,7 @@ static objset_t *sa_os = NULL; static sa_attr_type_t *sa_attr_table = NULL; static int -open_objset(const char *path, void *tag, objset_t **osp) +open_objset(const char *path, const void *tag, objset_t **osp) { int err; uint64_t sa_attrs = 0; @@ -3068,7 +3068,7 @@ open_objset(const char *path, void *tag, objset_t **osp) } static void -close_objset(objset_t *os, void *tag) +close_objset(objset_t *os, const void *tag) { VERIFY3P(os, ==, sa_os); if (os->os_sa != NULL) diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 1a2106c2e..e71959c3c 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -6438,7 +6438,7 @@ print_holds(boolean_t scripted, int nwidth, int tagwidth, nvlist_t *nvl) (void) nvpair_value_nvlist(nvp, &nvl2); while ((nvp2 = nvlist_next_nvpair(nvl2, nvp2)) != NULL) { char tsbuf[DATETIME_BUF_LEN]; - char *tagname = nvpair_name(nvp2); + const char *tagname = nvpair_name(nvp2); uint64_t val = 0; time_t time; struct tm t; diff --git a/cmd/zhack.c b/cmd/zhack.c index 71a2c5ae6..8221a67d5 100644 --- a/cmd/zhack.c +++ b/cmd/zhack.c @@ -88,7 +88,7 @@ usage(void) static __attribute__((format(printf, 3, 4))) __attribute__((noreturn)) void -fatal(spa_t *spa, void *tag, const char *fmt, ...) +fatal(spa_t *spa, const void *tag, const char *fmt, ...) { va_list ap; @@ -166,7 +166,7 @@ zhack_import(char *target, boolean_t readonly) } static void -zhack_spa_open(char *target, boolean_t readonly, void *tag, spa_t **spa) +zhack_spa_open(char *target, boolean_t readonly, const void *tag, spa_t **spa) { int err; diff --git a/cmd/ztest.c b/cmd/ztest.c index ff425973a..b7093ce95 100644 --- a/cmd/ztest.c +++ b/cmd/ztest.c @@ -1537,7 +1537,7 @@ ztest_spa_prop_set_uint64(zpool_prop_t prop, uint64_t value) static int ztest_dmu_objset_own(const char *name, dmu_objset_type_t type, - boolean_t readonly, boolean_t decrypt, void *tag, objset_t **osp) + boolean_t readonly, boolean_t decrypt, const void *tag, objset_t **osp) { int err; char *cp = NULL; @@ -2810,7 +2810,7 @@ ztest_io(ztest_ds_t *zd, uint64_t object, uint64_t offset) * Initialize an object description template. */ static void -ztest_od_init(ztest_od_t *od, uint64_t id, char *tag, uint64_t index, +ztest_od_init(ztest_od_t *od, uint64_t id, const char *tag, uint64_t index, dmu_object_type_t type, uint64_t blocksize, uint64_t dnodesize, uint64_t gen) { diff --git a/include/sys/arc.h b/include/sys/arc.h index 90b99c6cb..8cee8be4b 100644 --- a/include/sys/arc.h +++ b/include/sys/arc.h @@ -281,14 +281,14 @@ arc_buf_t *arc_loan_raw_buf(spa_t *spa, uint64_t dsobj, boolean_t byteorder, const uint8_t *salt, const uint8_t *iv, const uint8_t *mac, dmu_object_type_t ot, uint64_t psize, uint64_t lsize, enum zio_compress compression_type, uint8_t complevel); -void arc_return_buf(arc_buf_t *buf, void *tag); -void arc_loan_inuse_buf(arc_buf_t *buf, void *tag); -void arc_buf_destroy(arc_buf_t *buf, void *tag); +void arc_return_buf(arc_buf_t *buf, const void *tag); +void arc_loan_inuse_buf(arc_buf_t *buf, const void *tag); +void arc_buf_destroy(arc_buf_t *buf, const void *tag); void arc_buf_info(arc_buf_t *buf, arc_buf_info_t *abi, int state_index); uint64_t arc_buf_size(arc_buf_t *buf); uint64_t arc_buf_lsize(arc_buf_t *buf); void arc_buf_access(arc_buf_t *buf); -void arc_release(arc_buf_t *buf, void *tag); +void arc_release(arc_buf_t *buf, const void *tag); int arc_released(arc_buf_t *buf); void arc_buf_sigsegv(int sig, siginfo_t *si, void *unused); void arc_buf_freeze(arc_buf_t *buf); diff --git a/include/sys/dmu.h b/include/sys/dmu.h index 6bd7a3e9a..7c55a5c26 100644 --- a/include/sys/dmu.h +++ b/include/sys/dmu.h @@ -573,7 +573,7 @@ int dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, * Add a reference to a dmu buffer that has already been held via * dmu_buf_hold() in the current context. */ -void dmu_buf_add_ref(dmu_buf_t *db, void* tag); +void dmu_buf_add_ref(dmu_buf_t *db, const void *tag); /* * Attempt to add a reference to a dmu buffer that is in an unknown state, diff --git a/include/sys/dsl_bookmark.h b/include/sys/dsl_bookmark.h index 70f481344..353c5c2d2 100644 --- a/include/sys/dsl_bookmark.h +++ b/include/sys/dsl_bookmark.h @@ -114,7 +114,7 @@ typedef struct dsl_bookmark_create_redacted_arg { redaction_list_t **dbcra_rl; uint64_t dbcra_numsnaps; uint64_t *dbcra_snaps; - void *dbcra_tag; + const void *dbcra_tag; } dsl_bookmark_create_redacted_arg_t; int dsl_bookmark_create(nvlist_t *, nvlist_t *); @@ -122,7 +122,7 @@ int dsl_bookmark_create_nvl_validate(nvlist_t *); int dsl_bookmark_create_check(void *arg, dmu_tx_t *tx); void dsl_bookmark_create_sync(void *arg, dmu_tx_t *tx); int dsl_bookmark_create_redacted(const char *, const char *, uint64_t, - uint64_t *, void *, redaction_list_t **); + uint64_t *, const void *, redaction_list_t **); int dsl_get_bookmarks(const char *, nvlist_t *, nvlist_t *); int dsl_get_bookmarks_impl(dsl_dataset_t *, nvlist_t *, nvlist_t *); int dsl_get_bookmark_props(const char *, const char *, nvlist_t *); @@ -131,12 +131,12 @@ int dsl_bookmark_lookup(struct dsl_pool *, const char *, struct dsl_dataset *, zfs_bookmark_phys_t *); int dsl_bookmark_lookup_impl(dsl_dataset_t *, const char *, zfs_bookmark_phys_t *); -int dsl_redaction_list_hold_obj(struct dsl_pool *, uint64_t, void *, +int dsl_redaction_list_hold_obj(struct dsl_pool *, uint64_t, const void *, redaction_list_t **); -void dsl_redaction_list_rele(redaction_list_t *, void *); +void dsl_redaction_list_rele(redaction_list_t *, const void *); void dsl_redaction_list_long_hold(struct dsl_pool *, redaction_list_t *, - void *); -void dsl_redaction_list_long_rele(redaction_list_t *, void *); + const void *); +void dsl_redaction_list_long_rele(redaction_list_t *, const void *); boolean_t dsl_redaction_list_long_held(redaction_list_t *); int dsl_bookmark_init_ds(dsl_dataset_t *); void dsl_bookmark_fini_ds(dsl_dataset_t *); diff --git a/include/sys/dsl_crypt.h b/include/sys/dsl_crypt.h index 835720c87..db594eece 100644 --- a/include/sys/dsl_crypt.h +++ b/include/sys/dsl_crypt.h @@ -174,19 +174,20 @@ boolean_t dsl_dir_incompatible_encryption_version(dsl_dir_t *dd); void spa_keystore_init(spa_keystore_t *sk); void spa_keystore_fini(spa_keystore_t *sk); -void spa_keystore_dsl_key_rele(spa_t *spa, dsl_crypto_key_t *dck, void *tag); +void spa_keystore_dsl_key_rele(spa_t *spa, dsl_crypto_key_t *dck, + const void *tag); int spa_keystore_load_wkey_impl(spa_t *spa, dsl_wrapping_key_t *wkey); int spa_keystore_load_wkey(const char *dsname, dsl_crypto_params_t *dcp, boolean_t noop); int spa_keystore_unload_wkey_impl(spa_t *spa, uint64_t ddobj); int spa_keystore_unload_wkey(const char *dsname); -int spa_keystore_create_mapping(spa_t *spa, struct dsl_dataset *ds, void *tag, - dsl_key_mapping_t **km_out); -int spa_keystore_remove_mapping(spa_t *spa, uint64_t dsobj, void *tag); -void key_mapping_add_ref(dsl_key_mapping_t *km, void *tag); -void key_mapping_rele(spa_t *spa, dsl_key_mapping_t *km, void *tag); -int spa_keystore_lookup_key(spa_t *spa, uint64_t dsobj, void *tag, +int spa_keystore_create_mapping(spa_t *spa, struct dsl_dataset *ds, + const void *tag, dsl_key_mapping_t **km_out); +int spa_keystore_remove_mapping(spa_t *spa, uint64_t dsobj, const void *tag); +void key_mapping_add_ref(dsl_key_mapping_t *km, const void *tag); +void key_mapping_rele(spa_t *spa, dsl_key_mapping_t *km, const void *tag); +int spa_keystore_lookup_key(spa_t *spa, uint64_t dsobj, const void *tag, dsl_crypto_key_t **dck_out); int dsl_crypto_populate_key_nvlist(struct objset *os, diff --git a/include/sys/dsl_dir.h b/include/sys/dsl_dir.h index 993e44354..6c097e372 100644 --- a/include/sys/dsl_dir.h +++ b/include/sys/dsl_dir.h @@ -136,12 +136,12 @@ dsl_dir_phys(dsl_dir_t *dd) return (dd->dd_dbuf->db_data); } -void dsl_dir_rele(dsl_dir_t *dd, void *tag); -void dsl_dir_async_rele(dsl_dir_t *dd, void *tag); -int dsl_dir_hold(dsl_pool_t *dp, const char *name, void *tag, +void dsl_dir_rele(dsl_dir_t *dd, const void *tag); +void dsl_dir_async_rele(dsl_dir_t *dd, const void *tag); +int dsl_dir_hold(dsl_pool_t *dp, const char *name, const void *tag, dsl_dir_t **, const char **tail); int dsl_dir_hold_obj(dsl_pool_t *dp, uint64_t ddobj, - const char *tail, void *tag, dsl_dir_t **); + const char *tail, const void *tag, dsl_dir_t **); void dsl_dir_name(dsl_dir_t *dd, char *buf); int dsl_dir_namelen(dsl_dir_t *dd); uint64_t dsl_dir_create_sync(dsl_pool_t *dp, dsl_dir_t *pds, diff --git a/include/sys/metaslab.h b/include/sys/metaslab.h index b777a3cae..140739adb 100644 --- a/include/sys/metaslab.h +++ b/include/sys/metaslab.h @@ -131,9 +131,9 @@ uint64_t metaslab_group_get_space(metaslab_group_t *); void metaslab_group_histogram_verify(metaslab_group_t *); uint64_t metaslab_group_fragmentation(metaslab_group_t *); void metaslab_group_histogram_remove(metaslab_group_t *, metaslab_t *); -void metaslab_group_alloc_decrement(spa_t *, uint64_t, void *, int, int, +void metaslab_group_alloc_decrement(spa_t *, uint64_t, const void *, int, int, boolean_t); -void metaslab_group_alloc_verify(spa_t *, const blkptr_t *, void *, int); +void metaslab_group_alloc_verify(spa_t *, const blkptr_t *, const void *, int); void metaslab_recalculate_weight_and_sort(metaslab_t *); void metaslab_disable(metaslab_t *); void metaslab_enable(metaslab_t *, boolean_t, boolean_t); diff --git a/include/sys/sa.h b/include/sys/sa.h index 709018bde..42479652a 100644 --- a/include/sys/sa.h +++ b/include/sys/sa.h @@ -124,8 +124,8 @@ int sa_handle_get(objset_t *, uint64_t, void *userp, int sa_handle_get_from_db(objset_t *, dmu_buf_t *, void *userp, sa_handle_type_t, sa_handle_t **); void sa_handle_destroy(sa_handle_t *); -int sa_buf_hold(objset_t *, uint64_t, void *, dmu_buf_t **); -void sa_buf_rele(dmu_buf_t *, void *); +int sa_buf_hold(objset_t *, uint64_t, const void *, dmu_buf_t **); +void sa_buf_rele(dmu_buf_t *, const void *); int sa_lookup(sa_handle_t *, sa_attr_type_t, void *buf, uint32_t buflen); int sa_update(sa_handle_t *, sa_attr_type_t, void *buf, uint32_t buflen, dmu_tx_t *); diff --git a/include/sys/spa.h b/include/sys/spa.h index 62fad3378..cd2499b30 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -982,7 +982,7 @@ extern uint64_t spa_vdev_enter(spa_t *spa); extern uint64_t spa_vdev_detach_enter(spa_t *spa, uint64_t guid); extern uint64_t spa_vdev_config_enter(spa_t *spa); extern void spa_vdev_config_exit(spa_t *spa, vdev_t *vd, uint64_t txg, - int error, char *tag); + int error, const char *tag); extern int spa_vdev_exit(spa_t *spa, vdev_t *vd, uint64_t txg, int error); /* Pool vdev state change lock */ diff --git a/include/sys/vdev.h b/include/sys/vdev.h index 4e507d081..8a526d0bf 100644 --- a/include/sys/vdev.h +++ b/include/sys/vdev.h @@ -104,7 +104,7 @@ extern void vdev_metaslab_fini(vdev_t *vd); extern void vdev_metaslab_set_size(vdev_t *); extern void vdev_expand(vdev_t *vd, uint64_t txg); extern void vdev_split(vdev_t *vd); -extern void vdev_deadman(vdev_t *vd, char *tag); +extern void vdev_deadman(vdev_t *vd, const char *tag); typedef void vdev_xlate_func_t(void *arg, range_seg64_t *physical_rs); diff --git a/include/sys/zap.h b/include/sys/zap.h index fd7a3a159..dc2f661fb 100644 --- a/include/sys/zap.h +++ b/include/sys/zap.h @@ -139,7 +139,7 @@ uint64_t zap_create_flags_dnsize(objset_t *os, int normflags, uint64_t zap_create_hold(objset_t *os, int normflags, zap_flags_t flags, dmu_object_type_t ot, int leaf_blockshift, int indirect_blockshift, dmu_object_type_t bonustype, int bonuslen, int dnodesize, - dnode_t **allocated_dnode, void *tag, dmu_tx_t *tx); + dnode_t **allocated_dnode, const void *tag, dmu_tx_t *tx); uint64_t zap_create_link(objset_t *os, dmu_object_type_t ot, uint64_t parent_obj, const char *name, dmu_tx_t *tx); diff --git a/include/sys/zap_impl.h b/include/sys/zap_impl.h index 250dde3ce..4549a9bd1 100644 --- a/include/sys/zap_impl.h +++ b/include/sys/zap_impl.h @@ -199,8 +199,9 @@ typedef struct zap_name { boolean_t zap_match(zap_name_t *zn, const char *matchname); int zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx, - krw_t lti, boolean_t fatreader, boolean_t adding, void *tag, zap_t **zapp); -void zap_unlockdir(zap_t *zap, void *tag); + krw_t lti, boolean_t fatreader, boolean_t adding, const void *tag, + zap_t **zapp); +void zap_unlockdir(zap_t *zap, const void *tag); void zap_evict_sync(void *dbu); zap_name_t *zap_name_alloc(zap_t *zap, const char *key, matchtype_t mt); void zap_name_free(zap_name_t *zn); @@ -217,10 +218,10 @@ int fzap_lookup(zap_name_t *zn, char *realname, int rn_len, boolean_t *normalization_conflictp); void fzap_prefetch(zap_name_t *zn); int fzap_add(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, - const void *val, void *tag, dmu_tx_t *tx); + const void *val, const void *tag, dmu_tx_t *tx); int fzap_update(zap_name_t *zn, int integer_size, uint64_t num_integers, const void *val, - void *tag, dmu_tx_t *tx); + const void *tag, dmu_tx_t *tx); int fzap_length(zap_name_t *zn, uint64_t *integer_size, uint64_t *num_integers); int fzap_remove(zap_name_t *zn, dmu_tx_t *tx); @@ -230,7 +231,7 @@ void zap_put_leaf(struct zap_leaf *l); int fzap_add_cd(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, - const void *val, uint32_t cd, void *tag, dmu_tx_t *tx); + const void *val, uint32_t cd, const void *tag, dmu_tx_t *tx); void fzap_upgrade(zap_t *zap, dmu_tx_t *tx, zap_flags_t flags); #ifdef __cplusplus diff --git a/include/sys/zcp.h b/include/sys/zcp.h index d7b1dfaa2..f0a78f9cb 100644 --- a/include/sys/zcp.h +++ b/include/sys/zcp.h @@ -177,7 +177,7 @@ void zcp_parse_args(lua_State *, const char *, const zcp_arg_t *, int zcp_nvlist_to_lua(lua_State *, nvlist_t *, char *, int); int zcp_dataset_hold_error(lua_State *, dsl_pool_t *, const char *, int); struct dsl_dataset *zcp_dataset_hold(lua_State *, dsl_pool_t *, - const char *, void *); + const char *, const void *); typedef int (zcp_lib_func_t)(lua_State *); typedef struct zcp_lib_info { diff --git a/include/sys/zio.h b/include/sys/zio.h index 4b624165f..9bee7cc9b 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -589,7 +589,7 @@ extern void zio_execute(void *zio); extern void zio_interrupt(void *zio); extern void zio_delay_init(zio_t *zio); extern void zio_delay_interrupt(zio_t *zio); -extern void zio_deadman(zio_t *zio, char *tag); +extern void zio_deadman(zio_t *zio, const char *tag); extern zio_t *zio_walk_parents(zio_t *cio, zio_link_t **); extern zio_t *zio_walk_children(zio_t *pio, zio_link_t **); @@ -657,7 +657,8 @@ extern int zio_inject_fault(char *name, int flags, int *id, extern int zio_inject_list_next(int *id, char *name, size_t buflen, struct zinject_record *record); extern int zio_clear_fault(int id); -extern void zio_handle_panic_injection(spa_t *spa, char *tag, uint64_t type); +extern void zio_handle_panic_injection(spa_t *spa, const char *tag, + uint64_t type); extern int zio_handle_decrypt_injection(spa_t *spa, const zbookmark_phys_t *zb, uint64_t type, int error); extern int zio_handle_fault_injection(zio_t *zio, int error); diff --git a/module/os/freebsd/zfs/zfs_znode.c b/module/os/freebsd/zfs/zfs_znode.c index 84cff13f0..6115ac7a5 100644 --- a/module/os/freebsd/zfs/zfs_znode.c +++ b/module/os/freebsd/zfs/zfs_znode.c @@ -1814,7 +1814,7 @@ zfs_sa_setup(objset_t *osp, sa_attr_type_t **sa_table) static int zfs_grab_sa_handle(objset_t *osp, uint64_t obj, sa_handle_t **hdlp, - dmu_buf_t **db, void *tag) + dmu_buf_t **db, const void *tag) { dmu_object_info_t doi; int error; @@ -1841,7 +1841,7 @@ zfs_grab_sa_handle(objset_t *osp, uint64_t obj, sa_handle_t **hdlp, } static void -zfs_release_sa_handle(sa_handle_t *hdl, dmu_buf_t *db, void *tag) +zfs_release_sa_handle(sa_handle_t *hdl, dmu_buf_t *db, const void *tag) { sa_handle_destroy(hdl); sa_buf_rele(db, tag); diff --git a/module/os/linux/zfs/zfs_znode.c b/module/os/linux/zfs/zfs_znode.c index d921f2b07..dc504b1a1 100644 --- a/module/os/linux/zfs/zfs_znode.c +++ b/module/os/linux/zfs/zfs_znode.c @@ -2001,7 +2001,7 @@ zfs_sa_setup(objset_t *osp, sa_attr_type_t **sa_table) static int zfs_grab_sa_handle(objset_t *osp, uint64_t obj, sa_handle_t **hdlp, - dmu_buf_t **db, void *tag) + dmu_buf_t **db, const void *tag) { dmu_object_info_t doi; int error; @@ -2028,7 +2028,7 @@ zfs_grab_sa_handle(objset_t *osp, uint64_t obj, sa_handle_t **hdlp, } static void -zfs_release_sa_handle(sa_handle_t *hdl, dmu_buf_t *db, void *tag) +zfs_release_sa_handle(sa_handle_t *hdl, dmu_buf_t *db, const void *tag) { sa_handle_destroy(hdl); sa_buf_rele(db, tag); diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 919081c25..74019ad08 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -848,12 +848,13 @@ enum arc_hdr_alloc_flags { }; -static abd_t *arc_get_data_abd(arc_buf_hdr_t *, uint64_t, void *, int); -static void *arc_get_data_buf(arc_buf_hdr_t *, uint64_t, void *); -static void arc_get_data_impl(arc_buf_hdr_t *, uint64_t, void *, int); -static void arc_free_data_abd(arc_buf_hdr_t *, abd_t *, uint64_t, void *); -static void arc_free_data_buf(arc_buf_hdr_t *, void *, uint64_t, void *); -static void arc_free_data_impl(arc_buf_hdr_t *hdr, uint64_t size, void *tag); +static abd_t *arc_get_data_abd(arc_buf_hdr_t *, uint64_t, const void *, int); +static void *arc_get_data_buf(arc_buf_hdr_t *, uint64_t, const void *); +static void arc_get_data_impl(arc_buf_hdr_t *, uint64_t, const void *, int); +static void arc_free_data_abd(arc_buf_hdr_t *, abd_t *, uint64_t, const void *); +static void arc_free_data_buf(arc_buf_hdr_t *, void *, uint64_t, const void *); +static void arc_free_data_impl(arc_buf_hdr_t *hdr, uint64_t size, + const void *tag); static void arc_hdr_free_abd(arc_buf_hdr_t *, boolean_t); static void arc_hdr_alloc_abd(arc_buf_hdr_t *, int); static void arc_access(arc_buf_hdr_t *, kmutex_t *); @@ -2316,7 +2317,7 @@ add_reference(arc_buf_hdr_t *hdr, const void *tag) * list making it eligible for eviction. */ static int -remove_reference(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, void *tag) +remove_reference(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, const void *tag) { int cnt; arc_state_t *state = hdr->b_l1hdr.b_state; @@ -2900,7 +2901,7 @@ arc_loan_raw_buf(spa_t *spa, uint64_t dsobj, boolean_t byteorder, * Return a loaned arc buffer to the arc. */ void -arc_return_buf(arc_buf_t *buf, void *tag) +arc_return_buf(arc_buf_t *buf, const void *tag) { arc_buf_hdr_t *hdr = buf->b_hdr; @@ -2914,7 +2915,7 @@ arc_return_buf(arc_buf_t *buf, void *tag) /* Detach an arc_buf from a dbuf (tag) */ void -arc_loan_inuse_buf(arc_buf_t *buf, void *tag) +arc_loan_inuse_buf(arc_buf_t *buf, const void *tag) { arc_buf_hdr_t *hdr = buf->b_hdr; @@ -3845,7 +3846,7 @@ arc_hdr_destroy(arc_buf_hdr_t *hdr) } void -arc_buf_destroy(arc_buf_t *buf, void* tag) +arc_buf_destroy(arc_buf_t *buf, const void *tag) { arc_buf_hdr_t *hdr = buf->b_hdr; @@ -5208,7 +5209,7 @@ arc_is_overflowing(boolean_t use_reserve) } static abd_t * -arc_get_data_abd(arc_buf_hdr_t *hdr, uint64_t size, void *tag, +arc_get_data_abd(arc_buf_hdr_t *hdr, uint64_t size, const void *tag, int alloc_flags) { arc_buf_contents_t type = arc_buf_type(hdr); @@ -5223,7 +5224,7 @@ arc_get_data_abd(arc_buf_hdr_t *hdr, uint64_t size, void *tag, } static void * -arc_get_data_buf(arc_buf_hdr_t *hdr, uint64_t size, void *tag) +arc_get_data_buf(arc_buf_hdr_t *hdr, uint64_t size, const void *tag) { arc_buf_contents_t type = arc_buf_type(hdr); @@ -5322,7 +5323,7 @@ arc_wait_for_eviction(uint64_t amount, boolean_t use_reserve) * limit, we'll only signal the reclaim thread and continue on. */ static void -arc_get_data_impl(arc_buf_hdr_t *hdr, uint64_t size, void *tag, +arc_get_data_impl(arc_buf_hdr_t *hdr, uint64_t size, const void *tag, int alloc_flags) { arc_state_t *state = hdr->b_l1hdr.b_state; @@ -5390,14 +5391,15 @@ arc_get_data_impl(arc_buf_hdr_t *hdr, uint64_t size, void *tag, } static void -arc_free_data_abd(arc_buf_hdr_t *hdr, abd_t *abd, uint64_t size, void *tag) +arc_free_data_abd(arc_buf_hdr_t *hdr, abd_t *abd, uint64_t size, + const void *tag) { arc_free_data_impl(hdr, size, tag); abd_free(abd); } static void -arc_free_data_buf(arc_buf_hdr_t *hdr, void *buf, uint64_t size, void *tag) +arc_free_data_buf(arc_buf_hdr_t *hdr, void *buf, uint64_t size, const void *tag) { arc_buf_contents_t type = arc_buf_type(hdr); @@ -5414,7 +5416,7 @@ arc_free_data_buf(arc_buf_hdr_t *hdr, void *buf, uint64_t size, void *tag) * Free the arc data buffer. */ static void -arc_free_data_impl(arc_buf_hdr_t *hdr, uint64_t size, void *tag) +arc_free_data_impl(arc_buf_hdr_t *hdr, uint64_t size, const void *tag) { arc_state_t *state = hdr->b_l1hdr.b_state; arc_buf_contents_t type = arc_buf_type(hdr); @@ -6576,7 +6578,7 @@ arc_freed(spa_t *spa, const blkptr_t *bp) * a new hdr for the buffer. */ void -arc_release(arc_buf_t *buf, void *tag) +arc_release(arc_buf_t *buf, const void *tag) { arc_buf_hdr_t *hdr = buf->b_hdr; diff --git a/module/zfs/dmu_redact.c b/module/zfs/dmu_redact.c index 9b0fe8a74..ae2e65d5c 100644 --- a/module/zfs/dmu_redact.c +++ b/module/zfs/dmu_redact.c @@ -855,7 +855,7 @@ redact_merge_thread(void *arg) * object number. */ static int -hold_next_object(objset_t *os, struct redact_record *rec, void *tag, +hold_next_object(objset_t *os, struct redact_record *rec, const void *tag, uint64_t *object, dnode_t **dn) { int err = 0; diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index ab385ae30..ca0163891 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -1917,7 +1917,7 @@ send_reader_thread(void *arg) struct dmu_send_params { /* Pool args */ - void *tag; // Tag that dp was held with, will be used to release dp. + const void *tag; // Tag dp was held with, will be used to release dp. dsl_pool_t *dp; /* To snapshot args */ const char *tosnap; @@ -2366,7 +2366,7 @@ dmu_send_impl(struct dmu_send_params *dspp) dsl_dataset_t *to_ds = dspp->to_ds; zfs_bookmark_phys_t *ancestor_zb = &dspp->ancestor_zb; dsl_pool_t *dp = dspp->dp; - void *tag = dspp->tag; + const void *tag = dspp->tag; err = dmu_objset_from_ds(to_ds, &os); if (err != 0) { diff --git a/module/zfs/dsl_bookmark.c b/module/zfs/dsl_bookmark.c index 4e44b167f..8ca7ba895 100644 --- a/module/zfs/dsl_bookmark.c +++ b/module/zfs/dsl_bookmark.c @@ -37,7 +37,7 @@ static int dsl_bookmark_hold_ds(dsl_pool_t *dp, const char *fullname, - dsl_dataset_t **dsp, void *tag, char **shortnamep) + dsl_dataset_t **dsp, const void *tag, char **shortnamep) { char buf[ZFS_MAX_DATASET_NAME_LEN]; char *hashp; @@ -438,8 +438,8 @@ dsl_bookmark_node_add(dsl_dataset_t *hds, dsl_bookmark_node_t *dbn, */ static void dsl_bookmark_create_sync_impl_snap(const char *bookmark, const char *snapshot, - dmu_tx_t *tx, uint64_t num_redact_snaps, uint64_t *redact_snaps, void *tag, - redaction_list_t **redaction_list) + dmu_tx_t *tx, uint64_t num_redact_snaps, uint64_t *redact_snaps, + const void *tag, redaction_list_t **redaction_list) { dsl_pool_t *dp = dmu_tx_pool(tx); objset_t *mos = dp->dp_meta_objset; @@ -664,7 +664,8 @@ dsl_bookmark_create_redacted_sync(void *arg, dmu_tx_t *tx) int dsl_bookmark_create_redacted(const char *bookmark, const char *snapshot, - uint64_t numsnaps, uint64_t *snapguids, void *tag, redaction_list_t **rl) + uint64_t numsnaps, uint64_t *snapguids, const void *tag, + redaction_list_t **rl) { dsl_bookmark_create_redacted_arg_t dbcra; @@ -1188,14 +1189,15 @@ dsl_redaction_list_long_held(redaction_list_t *rl) } void -dsl_redaction_list_long_hold(dsl_pool_t *dp, redaction_list_t *rl, void *tag) +dsl_redaction_list_long_hold(dsl_pool_t *dp, redaction_list_t *rl, + const void *tag) { ASSERT(dsl_pool_config_held(dp)); (void) zfs_refcount_add(&rl->rl_longholds, tag); } void -dsl_redaction_list_long_rele(redaction_list_t *rl, void *tag) +dsl_redaction_list_long_rele(redaction_list_t *rl, const void *tag) { (void) zfs_refcount_remove(&rl->rl_longholds, tag); } @@ -1210,13 +1212,13 @@ redaction_list_evict_sync(void *rlu) } void -dsl_redaction_list_rele(redaction_list_t *rl, void *tag) +dsl_redaction_list_rele(redaction_list_t *rl, const void *tag) { dmu_buf_rele(rl->rl_dbuf, tag); } int -dsl_redaction_list_hold_obj(dsl_pool_t *dp, uint64_t rlobj, void *tag, +dsl_redaction_list_hold_obj(dsl_pool_t *dp, uint64_t rlobj, const void *tag, redaction_list_t **rlp) { objset_t *mos = dp->dp_meta_objset; diff --git a/module/zfs/dsl_crypt.c b/module/zfs/dsl_crypt.c index 44e0083d2..25cb4f6ab 100644 --- a/module/zfs/dsl_crypt.c +++ b/module/zfs/dsl_crypt.c @@ -80,13 +80,13 @@ int zfs_disable_ivset_guid_check = 0; static void -dsl_wrapping_key_hold(dsl_wrapping_key_t *wkey, void *tag) +dsl_wrapping_key_hold(dsl_wrapping_key_t *wkey, const void *tag) { (void) zfs_refcount_add(&wkey->wk_refcnt, tag); } static void -dsl_wrapping_key_rele(dsl_wrapping_key_t *wkey, void *tag) +dsl_wrapping_key_rele(dsl_wrapping_key_t *wkey, const void *tag) { (void) zfs_refcount_remove(&wkey->wk_refcnt, tag); } @@ -368,7 +368,7 @@ dsl_dir_incompatible_encryption_version(dsl_dir_t *dd) static int spa_keystore_wkey_hold_ddobj_impl(spa_t *spa, uint64_t ddobj, - void *tag, dsl_wrapping_key_t **wkey_out) + const void *tag, dsl_wrapping_key_t **wkey_out) { int ret; dsl_wrapping_key_t search_wkey; @@ -398,7 +398,7 @@ error: } static int -spa_keystore_wkey_hold_dd(spa_t *spa, dsl_dir_t *dd, void *tag, +spa_keystore_wkey_hold_dd(spa_t *spa, dsl_dir_t *dd, const void *tag, dsl_wrapping_key_t **wkey_out) { int ret; @@ -514,7 +514,7 @@ dsl_crypto_key_free(dsl_crypto_key_t *dck) } static void -dsl_crypto_key_rele(dsl_crypto_key_t *dck, void *tag) +dsl_crypto_key_rele(dsl_crypto_key_t *dck, const void *tag) { if (zfs_refcount_remove(&dck->dck_holds, tag) == 0) dsl_crypto_key_free(dck); @@ -522,7 +522,7 @@ dsl_crypto_key_rele(dsl_crypto_key_t *dck, void *tag) static int dsl_crypto_key_open(objset_t *mos, dsl_wrapping_key_t *wkey, - uint64_t dckobj, void *tag, dsl_crypto_key_t **dck_out) + uint64_t dckobj, const void *tag, dsl_crypto_key_t **dck_out) { int ret; uint64_t crypt = 0, guid = 0, version = 0; @@ -600,7 +600,7 @@ error: } static int -spa_keystore_dsl_key_hold_impl(spa_t *spa, uint64_t dckobj, void *tag, +spa_keystore_dsl_key_hold_impl(spa_t *spa, uint64_t dckobj, const void *tag, dsl_crypto_key_t **dck_out) { int ret; @@ -631,7 +631,7 @@ error: } static int -spa_keystore_dsl_key_hold_dd(spa_t *spa, dsl_dir_t *dd, void *tag, +spa_keystore_dsl_key_hold_dd(spa_t *spa, dsl_dir_t *dd, const void *tag, dsl_crypto_key_t **dck_out) { int ret; @@ -689,7 +689,7 @@ spa_keystore_dsl_key_hold_dd(spa_t *spa, dsl_dir_t *dd, void *tag, } void -spa_keystore_dsl_key_rele(spa_t *spa, dsl_crypto_key_t *dck, void *tag) +spa_keystore_dsl_key_rele(spa_t *spa, dsl_crypto_key_t *dck, const void *tag) { rw_enter(&spa->spa_keystore.sk_dk_lock, RW_WRITER); @@ -936,7 +936,7 @@ error: } void -key_mapping_add_ref(dsl_key_mapping_t *km, void *tag) +key_mapping_add_ref(dsl_key_mapping_t *km, const void *tag) { ASSERT3U(zfs_refcount_count(&km->km_refcnt), >=, 1); zfs_refcount_add(&km->km_refcnt, tag); @@ -953,7 +953,7 @@ key_mapping_add_ref(dsl_key_mapping_t *km, void *tag) * mapping after unmounting a dataset. */ void -key_mapping_rele(spa_t *spa, dsl_key_mapping_t *km, void *tag) +key_mapping_rele(spa_t *spa, dsl_key_mapping_t *km, const void *tag) { ASSERT3U(zfs_refcount_count(&km->km_refcnt), >=, 1); @@ -984,7 +984,7 @@ key_mapping_rele(spa_t *spa, dsl_key_mapping_t *km, void *tag) } int -spa_keystore_create_mapping(spa_t *spa, dsl_dataset_t *ds, void *tag, +spa_keystore_create_mapping(spa_t *spa, dsl_dataset_t *ds, const void *tag, dsl_key_mapping_t **km_out) { int ret; @@ -1043,7 +1043,7 @@ spa_keystore_create_mapping(spa_t *spa, dsl_dataset_t *ds, void *tag, } int -spa_keystore_remove_mapping(spa_t *spa, uint64_t dsobj, void *tag) +spa_keystore_remove_mapping(spa_t *spa, uint64_t dsobj, const void *tag) { int ret; dsl_key_mapping_t search_km; @@ -1081,7 +1081,7 @@ error_unlock: * without getting a reference to it. */ int -spa_keystore_lookup_key(spa_t *spa, uint64_t dsobj, void *tag, +spa_keystore_lookup_key(spa_t *spa, uint64_t dsobj, const void *tag, dsl_crypto_key_t **dck_out) { int ret; diff --git a/module/zfs/dsl_destroy.c b/module/zfs/dsl_destroy.c index 7dddd8eed..f44de67f4 100644 --- a/module/zfs/dsl_destroy.c +++ b/module/zfs/dsl_destroy.c @@ -200,7 +200,7 @@ rck_alloc(dsl_dataset_t *clone) static void dsl_dir_remove_clones_key_impl(dsl_dir_t *dd, uint64_t mintxg, dmu_tx_t *tx, - list_t *stack, void *tag) + list_t *stack, const void *tag) { objset_t *mos = dd->dd_pool->dp_meta_objset; diff --git a/module/zfs/dsl_dir.c b/module/zfs/dsl_dir.c index 252dd2912..b5f50c9bd 100644 --- a/module/zfs/dsl_dir.c +++ b/module/zfs/dsl_dir.c @@ -160,7 +160,7 @@ dsl_dir_evict_async(void *dbu) int dsl_dir_hold_obj(dsl_pool_t *dp, uint64_t ddobj, - const char *tail, void *tag, dsl_dir_t **ddp) + const char *tail, const void *tag, dsl_dir_t **ddp) { dmu_buf_t *dbuf; dsl_dir_t *dd; @@ -320,7 +320,7 @@ errout: } void -dsl_dir_rele(dsl_dir_t *dd, void *tag) +dsl_dir_rele(dsl_dir_t *dd, const void *tag) { dprintf_dd(dd, "%s\n", ""); spa_close(dd->dd_pool->dp_spa, tag); @@ -335,7 +335,7 @@ dsl_dir_rele(dsl_dir_t *dd, void *tag) * the spa. */ void -dsl_dir_async_rele(dsl_dir_t *dd, void *tag) +dsl_dir_async_rele(dsl_dir_t *dd, const void *tag) { dprintf_dd(dd, "%s\n", ""); spa_async_close(dd->dd_pool->dp_spa, tag); @@ -449,7 +449,7 @@ getcomponent(const char *path, char *component, const char **nextp) * (*tail)[0] == '@' means that the last component is a snapshot. */ int -dsl_dir_hold(dsl_pool_t *dp, const char *name, void *tag, +dsl_dir_hold(dsl_pool_t *dp, const char *name, const void *tag, dsl_dir_t **ddp, const char **tailp) { char *buf; diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c index 4303492e4..e8b581390 100644 --- a/module/zfs/dsl_scan.c +++ b/module/zfs/dsl_scan.c @@ -1505,7 +1505,7 @@ scan_prefetch_queue_compare(const void *a, const void *b) } static void -scan_prefetch_ctx_rele(scan_prefetch_ctx_t *spc, void *tag) +scan_prefetch_ctx_rele(scan_prefetch_ctx_t *spc, const void *tag) { if (zfs_refcount_remove(&spc->spc_refcnt, tag) == 0) { zfs_refcount_destroy(&spc->spc_refcnt); @@ -1514,7 +1514,7 @@ scan_prefetch_ctx_rele(scan_prefetch_ctx_t *spc, void *tag) } static scan_prefetch_ctx_t * -scan_prefetch_ctx_create(dsl_scan_t *scn, dnode_phys_t *dnp, void *tag) +scan_prefetch_ctx_create(dsl_scan_t *scn, dnode_phys_t *dnp, const void *tag) { scan_prefetch_ctx_t *spc; @@ -1536,7 +1536,7 @@ scan_prefetch_ctx_create(dsl_scan_t *scn, dnode_phys_t *dnp, void *tag) } static void -scan_prefetch_ctx_add_ref(scan_prefetch_ctx_t *spc, void *tag) +scan_prefetch_ctx_add_ref(scan_prefetch_ctx_t *spc, const void *tag) { zfs_refcount_add(&spc->spc_refcnt, tag); } diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c index ab32bfec1..444ab5222 100644 --- a/module/zfs/metaslab.c +++ b/module/zfs/metaslab.c @@ -4508,8 +4508,8 @@ metaslab_trace_fini(zio_alloc_list_t *zal) */ static void -metaslab_group_alloc_increment(spa_t *spa, uint64_t vdev, void *tag, int flags, - int allocator) +metaslab_group_alloc_increment(spa_t *spa, uint64_t vdev, const void *tag, + int flags, int allocator) { if (!(flags & METASLAB_ASYNC_ALLOC) || (flags & METASLAB_DONT_THROTTLE)) @@ -4542,8 +4542,8 @@ metaslab_group_increment_qdepth(metaslab_group_t *mg, int allocator) } void -metaslab_group_alloc_decrement(spa_t *spa, uint64_t vdev, void *tag, int flags, - int allocator, boolean_t io_complete) +metaslab_group_alloc_decrement(spa_t *spa, uint64_t vdev, const void *tag, + int flags, int allocator, boolean_t io_complete) { if (!(flags & METASLAB_ASYNC_ALLOC) || (flags & METASLAB_DONT_THROTTLE)) @@ -4560,7 +4560,7 @@ metaslab_group_alloc_decrement(spa_t *spa, uint64_t vdev, void *tag, int flags, } void -metaslab_group_alloc_verify(spa_t *spa, const blkptr_t *bp, void *tag, +metaslab_group_alloc_verify(spa_t *spa, const blkptr_t *bp, const void *tag, int allocator) { #ifdef ZFS_DEBUG diff --git a/module/zfs/sa.c b/module/zfs/sa.c index db8c2b831..368a9e3d9 100644 --- a/module/zfs/sa.c +++ b/module/zfs/sa.c @@ -1449,13 +1449,13 @@ sa_handle_get(objset_t *objset, uint64_t objid, void *userp, } int -sa_buf_hold(objset_t *objset, uint64_t obj_num, void *tag, dmu_buf_t **db) +sa_buf_hold(objset_t *objset, uint64_t obj_num, const void *tag, dmu_buf_t **db) { return (dmu_bonus_hold(objset, obj_num, tag, db)); } void -sa_buf_rele(dmu_buf_t *db, void *tag) +sa_buf_rele(dmu_buf_t *db, const void *tag) { dmu_buf_rele(db, tag); } diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index aaca2a8a5..2ae45e169 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -1215,7 +1215,8 @@ spa_vdev_config_enter(spa_t *spa) * of multiple transactions without releasing the spa_namespace_lock. */ void -spa_vdev_config_exit(spa_t *spa, vdev_t *vd, uint64_t txg, int error, char *tag) +spa_vdev_config_exit(spa_t *spa, vdev_t *vd, uint64_t txg, int error, + const char *tag) { ASSERT(MUTEX_HELD(&spa_namespace_lock)); diff --git a/module/zfs/space_map.c b/module/zfs/space_map.c index 61282f693..1aa20a967 100644 --- a/module/zfs/space_map.c +++ b/module/zfs/space_map.c @@ -549,7 +549,7 @@ space_map_write_intro_debug(space_map_t *sm, maptype_t maptype, dmu_tx_t *tx) static void space_map_write_seg(space_map_t *sm, uint64_t rstart, uint64_t rend, maptype_t maptype, uint64_t vdev_id, uint8_t words, dmu_buf_t **dbp, - void *tag, dmu_tx_t *tx) + const void *tag, dmu_tx_t *tx) { ASSERT3U(words, !=, 0); ASSERT3U(words, <=, 2); diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index dedbc1a23..de29e6fd4 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -5233,7 +5233,7 @@ vdev_split(vdev_t *vd) } void -vdev_deadman(vdev_t *vd, char *tag) +vdev_deadman(vdev_t *vd, const char *tag) { for (int c = 0; c < vd->vdev_children; c++) { vdev_t *cvd = vd->vdev_child[c]; diff --git a/module/zfs/zap.c b/module/zfs/zap.c index b2b9dc27f..d533f17cc 100644 --- a/module/zfs/zap.c +++ b/module/zfs/zap.c @@ -626,7 +626,7 @@ zap_deref_leaf(zap_t *zap, uint64_t h, dmu_tx_t *tx, krw_t lt, zap_leaf_t **lp) static int zap_expand_leaf(zap_name_t *zn, zap_leaf_t *l, - void *tag, dmu_tx_t *tx, zap_leaf_t **lp) + const void *tag, dmu_tx_t *tx, zap_leaf_t **lp) { zap_t *zap = zn->zn_zap; uint64_t hash = zn->zn_hash; @@ -715,7 +715,7 @@ zap_expand_leaf(zap_name_t *zn, zap_leaf_t *l, static void zap_put_leaf_maybe_grow_ptrtbl(zap_name_t *zn, zap_leaf_t *l, - void *tag, dmu_tx_t *tx) + const void *tag, dmu_tx_t *tx) { zap_t *zap = zn->zn_zap; int shift = zap_f_phys(zap)->zap_ptrtbl.zt_shift; @@ -824,7 +824,7 @@ fzap_lookup(zap_name_t *zn, int fzap_add_cd(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, - const void *val, uint32_t cd, void *tag, dmu_tx_t *tx) + const void *val, uint32_t cd, const void *tag, dmu_tx_t *tx) { zap_leaf_t *l; int err; @@ -876,7 +876,7 @@ out: int fzap_add(zap_name_t *zn, uint64_t integer_size, uint64_t num_integers, - const void *val, void *tag, dmu_tx_t *tx) + const void *val, const void *tag, dmu_tx_t *tx) { int err = fzap_check(zn, integer_size, num_integers); if (err != 0) @@ -889,7 +889,7 @@ fzap_add(zap_name_t *zn, int fzap_update(zap_name_t *zn, int integer_size, uint64_t num_integers, const void *val, - void *tag, dmu_tx_t *tx) + const void *tag, dmu_tx_t *tx) { zap_leaf_t *l; int err; diff --git a/module/zfs/zap_micro.c b/module/zfs/zap_micro.c index 85134e999..09780a6c5 100644 --- a/module/zfs/zap_micro.c +++ b/module/zfs/zap_micro.c @@ -42,7 +42,7 @@ #endif static int mzap_upgrade(zap_t **zapp, - void *tag, dmu_tx_t *tx, zap_flags_t flags); + const void *tag, dmu_tx_t *tx, zap_flags_t flags); uint64_t zap_getflags(zap_t *zap) @@ -503,7 +503,7 @@ handle_winner: * have the specified tag. */ static int -zap_lockdir_impl(dmu_buf_t *db, void *tag, dmu_tx_t *tx, +zap_lockdir_impl(dmu_buf_t *db, const void *tag, dmu_tx_t *tx, krw_t lti, boolean_t fatreader, boolean_t adding, zap_t **zapp) { ASSERT0(db->db_offset); @@ -579,7 +579,8 @@ zap_lockdir_impl(dmu_buf_t *db, void *tag, dmu_tx_t *tx, static int zap_lockdir_by_dnode(dnode_t *dn, dmu_tx_t *tx, - krw_t lti, boolean_t fatreader, boolean_t adding, void *tag, zap_t **zapp) + krw_t lti, boolean_t fatreader, boolean_t adding, const void *tag, + zap_t **zapp) { dmu_buf_t *db; @@ -604,7 +605,8 @@ zap_lockdir_by_dnode(dnode_t *dn, dmu_tx_t *tx, int zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx, - krw_t lti, boolean_t fatreader, boolean_t adding, void *tag, zap_t **zapp) + krw_t lti, boolean_t fatreader, boolean_t adding, const void *tag, + zap_t **zapp) { dmu_buf_t *db; @@ -625,14 +627,14 @@ zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx, } void -zap_unlockdir(zap_t *zap, void *tag) +zap_unlockdir(zap_t *zap, const void *tag) { rw_exit(&zap->zap_rwlock); dmu_buf_rele(zap->zap_dbuf, tag); } static int -mzap_upgrade(zap_t **zapp, void *tag, dmu_tx_t *tx, zap_flags_t flags) +mzap_upgrade(zap_t **zapp, const void *tag, dmu_tx_t *tx, zap_flags_t flags) { int err = 0; zap_t *zap = *zapp; @@ -725,7 +727,7 @@ static uint64_t zap_create_impl(objset_t *os, int normflags, zap_flags_t flags, dmu_object_type_t ot, int leaf_blockshift, int indirect_blockshift, dmu_object_type_t bonustype, int bonuslen, int dnodesize, - dnode_t **allocated_dnode, void *tag, dmu_tx_t *tx) + dnode_t **allocated_dnode, const void *tag, dmu_tx_t *tx) { uint64_t obj; @@ -857,7 +859,7 @@ uint64_t zap_create_hold(objset_t *os, int normflags, zap_flags_t flags, dmu_object_type_t ot, int leaf_blockshift, int indirect_blockshift, dmu_object_type_t bonustype, int bonuslen, int dnodesize, - dnode_t **allocated_dnode, void *tag, dmu_tx_t *tx) + dnode_t **allocated_dnode, const void *tag, dmu_tx_t *tx) { return (zap_create_impl(os, normflags, flags, ot, leaf_blockshift, indirect_blockshift, bonustype, bonuslen, dnodesize, @@ -1222,7 +1224,7 @@ again: static int zap_add_impl(zap_t *zap, const char *key, int integer_size, uint64_t num_integers, - const void *val, dmu_tx_t *tx, void *tag) + const void *val, dmu_tx_t *tx, const void *tag) { const uint64_t *intval = val; int err = 0; diff --git a/module/zfs/zcp.c b/module/zfs/zcp.c index dcfb55d3b..fe90242ca 100644 --- a/module/zfs/zcp.c +++ b/module/zfs/zcp.c @@ -622,7 +622,7 @@ zcp_dataset_hold_error(lua_State *state, dsl_pool_t *dp, const char *dsname, */ dsl_dataset_t * zcp_dataset_hold(lua_State *state, dsl_pool_t *dp, const char *dsname, - void *tag) + const void *tag) { dsl_dataset_t *ds; int error = dsl_dataset_hold(dp, dsname, tag, &ds); diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 35aec5226..3b71dcb0e 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -1397,7 +1397,8 @@ getzfsvfs(const char *dsname, zfsvfs_t **zfvp) * which prevents all inode ops from running. */ static int -zfsvfs_hold(const char *name, void *tag, zfsvfs_t **zfvp, boolean_t writer) +zfsvfs_hold(const char *name, const void *tag, zfsvfs_t **zfvp, + boolean_t writer) { int error = 0; @@ -1422,7 +1423,7 @@ zfsvfs_hold(const char *name, void *tag, zfsvfs_t **zfvp, boolean_t writer) } static void -zfsvfs_rele(zfsvfs_t *zfsvfs, void *tag) +zfsvfs_rele(zfsvfs_t *zfsvfs, const void *tag) { ZFS_TEARDOWN_EXIT(zfsvfs, tag); diff --git a/module/zfs/zio.c b/module/zfs/zio.c index ae99f1e64..1c9f598b7 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -2062,7 +2062,7 @@ zio_deadman_impl(zio_t *pio, int ziodepth) * using the zfs_dbgmsg() interface then post deadman event for the ZED. */ void -zio_deadman(zio_t *pio, char *tag) +zio_deadman(zio_t *pio, const char *tag) { spa_t *spa = pio->io_spa; char *name = spa_name(spa); diff --git a/module/zfs/zio_inject.c b/module/zfs/zio_inject.c index 9b629ca0f..f10abaf17 100644 --- a/module/zfs/zio_inject.c +++ b/module/zfs/zio_inject.c @@ -162,7 +162,7 @@ zio_match_handler(const zbookmark_phys_t *zb, uint64_t type, int dva, * specified by tag. */ void -zio_handle_panic_injection(spa_t *spa, char *tag, uint64_t type) +zio_handle_panic_injection(spa_t *spa, const char *tag, uint64_t type) { inject_handler_t *handler; |