Skip to content

Commit

Permalink
Restore dirty dnode detection logic
Browse files Browse the repository at this point in the history
In addition to flushing memory mapped regions when checking holes,
commit de198f2 modified the dirty dnode detection logic to check
the dn->dn_dirty_records instead of the dn->dn_dirty_link.  Relying
on the dirty record has not be reliable, switch back to the previous
method.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#11900 
Closes openzfs#12745
  • Loading branch information
behlendorf authored and tonyhutter committed Nov 12, 2021
1 parent 1e842b9 commit e3a180f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/dnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ dnode_is_dirty(dnode_t *dn)
mutex_enter(&dn->dn_mtx);

for (int i = 0; i < TXG_SIZE; i++) {
if (list_head(&dn->dn_dirty_records[i]) != NULL) {
if (multilist_link_active(&dn->dn_dirty_link[i])) {
mutex_exit(&dn->dn_mtx);
return (B_TRUE);
}
Expand Down

0 comments on commit e3a180f

Please sign in to comment.