diff options
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/dmu_impl.h | 1 | ||||
-rw-r--r-- | include/sys/dnode.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sys/dmu_impl.h b/include/sys/dmu_impl.h index 65e417e3f..03a63077f 100644 --- a/include/sys/dmu_impl.h +++ b/include/sys/dmu_impl.h @@ -161,6 +161,7 @@ extern "C" { * dn_allocated_txg * dn_free_txg * dn_assigned_txg + * dn_dirty_txg * dd_assigned_tx * dn_notxholds * dn_dirtyctx diff --git a/include/sys/dnode.h b/include/sys/dnode.h index 1cb7cae09..2f70d5446 100644 --- a/include/sys/dnode.h +++ b/include/sys/dnode.h @@ -329,6 +329,7 @@ struct dnode { uint64_t dn_allocated_txg; uint64_t dn_free_txg; uint64_t dn_assigned_txg; + uint64_t dn_dirty_txg; /* txg dnode was last dirtied */ kcondvar_t dn_notxholds; enum dnode_dirtycontext dn_dirtyctx; uint8_t *dn_dirtyctx_firstset; /* dbg: contents meaningless */ @@ -432,6 +433,9 @@ void dnode_evict_dbufs(dnode_t *dn); void dnode_evict_bonus(dnode_t *dn); void dnode_free_interior_slots(dnode_t *dn); +#define DNODE_IS_DIRTY(_dn) \ + ((_dn)->dn_dirty_txg >= spa_syncing_txg((_dn)->dn_objset->os_spa)) + #define DNODE_IS_CACHEABLE(_dn) \ ((_dn)->dn_objset->os_primary_cache == ZFS_CACHE_ALL || \ (DMU_OT_IS_METADATA((_dn)->dn_type) && \ |