X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=include%2Fsys%2Fdsl_dir.h;h=46223f84c86bc7b2a2eaca83bd7a770cd2dbaf48;hb=d683ddbb7272a179da3918cc4f922d92a2195ba2;hp=a9c4f67515a9539b3169f0d35884eee6a1f9829b;hpb=945dd93525d6e33f822beb44e3a3076c8bc89f86;p=mirror_zfs.git diff --git a/include/sys/dsl_dir.h b/include/sys/dsl_dir.h index a9c4f6751..46223f84c 100644 --- a/include/sys/dsl_dir.h +++ b/include/sys/dsl_dir.h @@ -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);