mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
dnode: add dn_dirtycnt, count of number of txgs this dnode is dirty on
Bumped when we take the dirty hold in dnode_setdirty(), dropped when the dnode is finally cleaned up after sync in dnode_rele_task() or userquota_updates_task(). This gives us a way to check if the dnode is dirty on any txg without having to rely on outside information (eg presence on a dirty list), which has been a rich source of bugs in the past. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Suggested-by: Robert Evans <evansr@google.com> 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
14d2480708
commit
3abf72b251
@@ -169,6 +169,7 @@ extern "C" {
|
||||
* dn_free_txg
|
||||
* dn_assigned_txg
|
||||
* dn_dirty_txg
|
||||
* dn_dirtycnt
|
||||
* dd_assigned_tx
|
||||
* dn_notxholds
|
||||
* dn_nodnholds
|
||||
|
||||
@@ -341,6 +341,7 @@ struct dnode {
|
||||
uint64_t dn_free_txg;
|
||||
uint64_t dn_assigned_txg;
|
||||
uint64_t dn_dirty_txg; /* txg dnode was last dirtied */
|
||||
uint8_t dn_dirtycnt;
|
||||
kcondvar_t dn_notxholds;
|
||||
kcondvar_t dn_nodnholds;
|
||||
enum dnode_dirtycontext dn_dirtyctx;
|
||||
|
||||
Reference in New Issue
Block a user