diff options
author | наб <[email protected]> | 2022-04-19 20:49:30 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-06-29 14:08:59 -0700 |
commit | dd66857d92d86643bda57b92fdd58f016bd1725e (patch) | |
tree | 9048c7e8ea0821c264cbaab4ee5a29379393ddbf /module/zfs | |
parent | a926aab902ac5c680f4766568d19674b80fb58bb (diff) |
Remaining {=> const} char|void *tag
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #13348
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/arc.c | 36 | ||||
-rw-r--r-- | module/zfs/dmu_redact.c | 2 | ||||
-rw-r--r-- | module/zfs/dmu_send.c | 4 | ||||
-rw-r--r-- | module/zfs/dsl_bookmark.c | 18 | ||||
-rw-r--r-- | module/zfs/dsl_crypt.c | 28 | ||||
-rw-r--r-- | module/zfs/dsl_destroy.c | 2 | ||||
-rw-r--r-- | module/zfs/dsl_dir.c | 8 | ||||
-rw-r--r-- | module/zfs/dsl_scan.c | 6 | ||||
-rw-r--r-- | module/zfs/metaslab.c | 10 | ||||
-rw-r--r-- | module/zfs/sa.c | 4 | ||||
-rw-r--r-- | module/zfs/spa_misc.c | 3 | ||||
-rw-r--r-- | module/zfs/space_map.c | 2 | ||||
-rw-r--r-- | module/zfs/vdev.c | 2 | ||||
-rw-r--r-- | module/zfs/zap.c | 10 | ||||
-rw-r--r-- | module/zfs/zap_micro.c | 20 | ||||
-rw-r--r-- | module/zfs/zcp.c | 2 | ||||
-rw-r--r-- | module/zfs/zfs_ioctl.c | 5 | ||||
-rw-r--r-- | module/zfs/zio.c | 2 | ||||
-rw-r--r-- | module/zfs/zio_inject.c | 2 |
19 files changed, 87 insertions, 79 deletions
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; |