]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Restore dirty dnode detection logic
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 11 Nov 2021 00:14:32 +0000 (16:14 -0800)
committerGitHub <noreply@github.com>
Thu, 11 Nov 2021 00:14:32 +0000 (16:14 -0800)
In addition to flushing memory mapped regions when checking holes,
commit de198f2d95 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 #11900
Closes #12745

module/zfs/dnode.c

index 6f87f49f89f3a093a056eb3dcb52623dd41917fc..db1a5d71df3c6117f31d631de45686f0e3da4983 100644 (file)
@@ -1657,7 +1657,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);
                }