aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/zap_leaf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys/zap_leaf.h')
-rw-r--r--include/sys/zap_leaf.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/sys/zap_leaf.h b/include/sys/zap_leaf.h
index f6947a72d..d3749f368 100644
--- a/include/sys/zap_leaf.h
+++ b/include/sys/zap_leaf.h
@@ -83,7 +83,7 @@ struct zap_stats;
*/
#define ZAP_LEAF_CHUNK(l, idx) \
((zap_leaf_chunk_t *) \
- ((l)->l_phys->l_hash + ZAP_LEAF_HASH_NUMENTRIES(l)))[idx]
+ (zap_leaf_phys(l)->l_hash + ZAP_LEAF_HASH_NUMENTRIES(l)))[idx]
#define ZAP_LEAF_ENTRY(l, idx) (&ZAP_LEAF_CHUNK(l, idx).l_entry)
typedef enum zap_chunk_type {
@@ -156,9 +156,13 @@ typedef struct zap_leaf {
uint64_t l_blkid; /* 1<<ZAP_BLOCK_SHIFT byte block off */
int l_bs; /* block size shift */
dmu_buf_t *l_dbuf;
- zap_leaf_phys_t *l_phys;
} zap_leaf_t;
+static inline zap_leaf_phys_t *
+zap_leaf_phys(zap_leaf_t *l)
+{
+ return (l->l_dbuf->db_data);
+}
typedef struct zap_entry_handle {
/* Set by zap_leaf and public to ZAP */