mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
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 <justing@spectralogic.com> Reviewed by: Andriy Gapon <avg@freebsd.org> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Will Andrews <willa@spectralogic.com> Approved by: Dan McDonald <danmcd@omniti.com> References: https://www.illumos.org/issues/5314 https://github.com/illumos/illumos-gate/commit/c137962 Ported-by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
committed by
Brian Behlendorf
parent
945dd93525
commit
d683ddbb72
+14
-5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user