From 67f8ab8ebb6b1010a377b5b9309a91ff1e4143f8 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Tue, 15 Oct 2019 15:52:01 +0000 Subject: [PATCH] fix up r353565, somehow a few files did not get committed MFC after: 3 weeks X-MFC with: r353565 --- .../opensolaris/uts/common/fs/zfs/dbuf_stats.c | 4 ++-- .../contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c | 12 ++++++------ .../contrib/opensolaris/uts/common/fs/zfs/sys/arc.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf_stats.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf_stats.c index 1d1ba4edfa07..0a86830f71ad 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf_stats.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf_stats.c @@ -90,7 +90,7 @@ __dbuf_stats_hash_table_data(char *buf, size_t size, dmu_buf_impl_t *db) (u_longlong_t)db->db.db_size, !!dbuf_is_metadata(db), db->db_state, - (ulong_t)refcount_count(&db->db_holds), + (ulong_t)zfs_refcount_count(&db->db_holds), /* arc_buf_info_t */ abi.abi_state_type, abi.abi_state_contents, @@ -115,7 +115,7 @@ __dbuf_stats_hash_table_data(char *buf, size_t size, dmu_buf_impl_t *db) (ulong_t)doi.doi_metadata_block_size, (u_longlong_t)doi.doi_bonus_size, (ulong_t)doi.doi_indirection, - (ulong_t)refcount_count(&dn->dn_holds), + (ulong_t)zfs_refcount_count(&dn->dn_holds), (u_longlong_t)doi.doi_fill_count, (u_longlong_t)doi.doi_max_offset); buf[size] = '\0'; diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c index 2966df66da85..316b09ad5db9 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c @@ -318,7 +318,7 @@ struct dsl_scan_io_queue { /* private data for dsl_scan_prefetch_cb() */ typedef struct scan_prefetch_ctx { - refcount_t spc_refcnt; /* refcount for memory management */ + zfs_refcount_t spc_refcnt; /* refcount for memory management */ dsl_scan_t *spc_scn; /* dsl_scan_t for the pool */ boolean_t spc_root; /* is this prefetch for an objset? */ uint8_t spc_indblkshift; /* dn_indblkshift of current dnode */ @@ -1326,8 +1326,8 @@ scan_prefetch_queue_compare(const void *a, const void *b) static void scan_prefetch_ctx_rele(scan_prefetch_ctx_t *spc, void *tag) { - if (refcount_remove(&spc->spc_refcnt, tag) == 0) { - refcount_destroy(&spc->spc_refcnt); + if (zfs_refcount_remove(&spc->spc_refcnt, tag) == 0) { + zfs_refcount_destroy(&spc->spc_refcnt); kmem_free(spc, sizeof (scan_prefetch_ctx_t)); } } @@ -1338,8 +1338,8 @@ scan_prefetch_ctx_create(dsl_scan_t *scn, dnode_phys_t *dnp, void *tag) scan_prefetch_ctx_t *spc; spc = kmem_alloc(sizeof (scan_prefetch_ctx_t), KM_SLEEP); - refcount_create(&spc->spc_refcnt); - refcount_add(&spc->spc_refcnt, tag); + zfs_refcount_create(&spc->spc_refcnt); + zfs_refcount_add(&spc->spc_refcnt, tag); spc->spc_scn = scn; if (dnp != NULL) { spc->spc_datablkszsec = dnp->dn_datablkszsec; @@ -1357,7 +1357,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) { - refcount_add(&spc->spc_refcnt, tag); + zfs_refcount_add(&spc->spc_refcnt, tag); } static boolean_t diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h index 7be5f9037dd3..95513f0cba21 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h @@ -86,7 +86,7 @@ struct arc_prune { void *p_private; uint64_t p_adjust; list_node_t p_node; - refcount_t p_refcnt; + zfs_refcount_t p_refcnt; }; typedef enum arc_strategy {