]> git.proxmox.com Git - mirror_zfs.git/blobdiff - include/sys/dsl_dir.h
Illumos 5314 - Remove "dbuf phys" db->db_data pointer aliases in ZFS
[mirror_zfs.git] / include / sys / dsl_dir.h
index a9c4f67515a9539b3169f0d35884eee6a1f9829b..46223f84c86bc7b2a2eaca83bd7a770cd2dbaf48 100644 (file)
@@ -86,10 +86,11 @@ typedef struct dsl_dir_phys {
 struct dsl_dir {
        /* These are immutable; no lock needed: */
        uint64_t dd_object;
-       dsl_dir_phys_t *dd_phys;
-       dmu_buf_t *dd_dbuf;
        dsl_pool_t *dd_pool;
 
+       /* Stable until user eviction; no lock needed: */
+       dmu_buf_t *dd_dbuf;
+
        /* protected by lock on pool's dp_dirty_dirs list */
        txg_node_t dd_dirty_link;
 
@@ -111,6 +112,12 @@ struct dsl_dir {
        char dd_myname[MAXNAMELEN];
 };
 
+static inline dsl_dir_phys_t *
+dsl_dir_phys(dsl_dir_t *dd)
+{
+       return (dd->dd_dbuf->db_data);
+}
+
 void dsl_dir_rele(dsl_dir_t *dd, void *tag);
 int dsl_dir_hold(dsl_pool_t *dp, const char *name, void *tag,
     dsl_dir_t **, const char **tail);