mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Remaining {=> const} char|void *tag
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13348
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
+19
-17
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
+14
-14
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
@@ -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];
|
||||
|
||||
+5
-5
@@ -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;
|
||||
|
||||
+11
-9
@@ -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;
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user