mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 20:22:14 +03:00
dnode: remove dn_dirtyctx and dnode_dirtycontext
Only used for a couple of debug assertions which had very little value. Setting it required taking certain locks, so we can remove all that too. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Robert Evans <evansr@google.com> Reviewed-by: Adam Moss <c@yotes.com> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16297 Closes #17652 Closes #17658
This commit is contained in:
committed by
Brian Behlendorf
parent
aa6f0f878b
commit
574eec2964
@@ -2270,14 +2270,6 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx)
|
||||
if (dn->dn_objset->os_dsl_dataset != NULL)
|
||||
rrw_exit(&dn->dn_objset->os_dsl_dataset->ds_bp_rwlock, FTAG);
|
||||
#endif
|
||||
/*
|
||||
* We make this assert for private objects as well, but after we
|
||||
* check if we're already dirty. They are allowed to re-dirty
|
||||
* in syncing context.
|
||||
*/
|
||||
ASSERT(dn->dn_object == DMU_META_DNODE_OBJECT ||
|
||||
dn->dn_dirtyctx == DN_UNDIRTIED || dn->dn_dirtyctx ==
|
||||
(dmu_tx_is_syncing(tx) ? DN_DIRTY_SYNC : DN_DIRTY_OPEN));
|
||||
|
||||
mutex_enter(&db->db_mtx);
|
||||
/*
|
||||
@@ -2289,10 +2281,6 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx)
|
||||
db->db_state == DB_CACHED || db->db_state == DB_FILL ||
|
||||
db->db_state == DB_NOFILL);
|
||||
|
||||
mutex_enter(&dn->dn_mtx);
|
||||
dnode_set_dirtyctx(dn, tx, db);
|
||||
mutex_exit(&dn->dn_mtx);
|
||||
|
||||
if (db->db_blkid == DMU_SPILL_BLKID)
|
||||
dn->dn_have_spill = B_TRUE;
|
||||
|
||||
@@ -2311,13 +2299,6 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx)
|
||||
return (dr_next);
|
||||
}
|
||||
|
||||
/*
|
||||
* Only valid if not already dirty.
|
||||
*/
|
||||
ASSERT(dn->dn_object == 0 ||
|
||||
dn->dn_dirtyctx == DN_UNDIRTIED || dn->dn_dirtyctx ==
|
||||
(dmu_tx_is_syncing(tx) ? DN_DIRTY_SYNC : DN_DIRTY_OPEN));
|
||||
|
||||
ASSERT3U(dn->dn_nlevels, >, db->db_level);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user