diff options
author | Justin T. Gibbs <[email protected]> | 2015-04-02 02:14:34 +1100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-04-28 16:25:20 -0700 |
commit | d683ddbb7272a179da3918cc4f922d92a2195ba2 (patch) | |
tree | 82e1d7a9e0a269de978e2d3d07fa785db63961f7 /include/sys/zap_impl.h | |
parent | 945dd93525d6e33f822beb44e3a3076c8bc89f86 (diff) |
Illumos 5314 - Remove "dbuf phys" db->db_data pointer aliases in ZFS
5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS
Author: Justin T. Gibbs <[email protected]>
Reviewed by: Andriy Gapon <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Will Andrews <[email protected]>
Approved by: Dan McDonald <[email protected]>
References:
https://www.illumos.org/issues/5314
https://github.com/illumos/illumos-gate/commit/c137962
Ported-by: Chris Dunlop <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'include/sys/zap_impl.h')
-rw-r--r-- | include/sys/zap_impl.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/sys/zap_impl.h b/include/sys/zap_impl.h index 1dc322e02..4b51a2ae2 100644 --- a/include/sys/zap_impl.h +++ b/include/sys/zap_impl.h @@ -70,7 +70,7 @@ typedef struct mzap_ent { } mzap_ent_t; #define MZE_PHYS(zap, mze) \ - (&(zap)->zap_m.zap_phys->mz_chunk[(mze)->mze_chunkid]) + (&zap_m_phys(zap)->mz_chunk[(mze)->mze_chunkid]) /* * The (fat) zap is stored in one object. It is an array of @@ -104,7 +104,7 @@ struct zap_leaf; * word number (1<<ZAP_EMBEDDED_PTRTBL_SHIFT(zap)). */ #define ZAP_EMBEDDED_PTRTBL_ENT(zap, idx) \ - ((uint64_t *)(zap)->zap_f.zap_phys) \ + ((uint64_t *)zap_f_phys(zap)) \ [(idx) + (1<<ZAP_EMBEDDED_PTRTBL_SHIFT(zap))] /* @@ -149,8 +149,6 @@ typedef struct zap { uint64_t zap_salt; union { struct { - zap_phys_t *zap_phys; - /* * zap_num_entries_mtx protects * zap_num_entries @@ -159,7 +157,6 @@ typedef struct zap { int zap_block_shift; } zap_fat; struct { - mzap_phys_t *zap_phys; int16_t zap_num_entries; int16_t zap_num_chunks; int16_t zap_alloc_next; @@ -168,6 +165,18 @@ typedef struct zap { } zap_u; } zap_t; +static inline zap_phys_t * +zap_f_phys(zap_t *zap) +{ + return (zap->zap_dbuf->db_data); +} + +static inline mzap_phys_t * +zap_m_phys(zap_t *zap) +{ + return (zap->zap_dbuf->db_data); +} + typedef struct zap_name { zap_t *zn_zap; int zn_key_intlen; |