diff options
author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2022-04-19 18:49:30 +0000 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2022-06-29 21:08:59 +0000 |
commit | dd66857d92d86643bda57b92fdd58f016bd1725e (patch) | |
tree | 9048c7e8ea0821c264cbaab4ee5a29379393ddbf /include/sys | |
parent | a926aab902ac5c680f4766568d19674b80fb58bb (diff) | |
download | src-dd66857d92d86643bda57b92fdd58f016bd1725e.tar.gz src-dd66857d92d86643bda57b92fdd58f016bd1725e.zip |
Remaining {=> const} char|void *tag
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13348
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/arc.h | 8 | ||||
-rw-r--r-- | include/sys/dmu.h | 2 | ||||
-rw-r--r-- | include/sys/dsl_bookmark.h | 12 | ||||
-rw-r--r-- | include/sys/dsl_crypt.h | 15 | ||||
-rw-r--r-- | include/sys/dsl_dir.h | 8 | ||||
-rw-r--r-- | include/sys/metaslab.h | 4 | ||||
-rw-r--r-- | include/sys/sa.h | 4 | ||||
-rw-r--r-- | include/sys/spa.h | 2 | ||||
-rw-r--r-- | include/sys/vdev.h | 2 | ||||
-rw-r--r-- | include/sys/zap.h | 2 | ||||
-rw-r--r-- | include/sys/zap_impl.h | 11 | ||||
-rw-r--r-- | include/sys/zcp.h | 2 | ||||
-rw-r--r-- | include/sys/zio.h | 5 |
13 files changed, 40 insertions, 37 deletions
diff --git a/include/sys/arc.h b/include/sys/arc.h index 90b99c6cb1a3..8cee8be4bc93 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 6bd7a3e9a412..7c55a5c26189 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 70f4813449aa..353c5c2d260f 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 835720c87872..db594eece1c3 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 993e44354475..6c097e372e44 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 b777a3cae439..140739adb562 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 709018bde612..42479652ab2c 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 62fad3378e56..cd2499b30b40 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 4e507d081957..8a526d0bf511 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 fd7a3a1599bc..dc2f661fb065 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 250dde3ce235..4549a9bd1177 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 d7b1dfaa2ea5..f0a78f9cb5c4 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 4b624165f8b3..9bee7cc9b9fd 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); |