mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Fix incorrect assertion in dnode_dirty_l1range
The db_dirtycnt of an EVICTING dbuf is always 0. However, it still appears in the dn_dbufs tree. If we call dnode_dirty_l1range on a range that contains an EVICTING dbuf, we will attempt to mark it dirty (which will fail because it's EVICTING, resulting in a new dbuf being created and dirtied). Later, in ZFS_DEBUG mode, we assert that all the dbufs in the range are dirty. If the EVICTING dbuf is still present, this will trip the assertion erroneously. Reviewed-by: Matt Ahrens <mahrens@delphix.com> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: Sara Hartse <sara.hartse@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Closes #8745
This commit is contained in:
parent
f378f42b53
commit
e61b53475e
@ -1967,7 +1967,8 @@ dnode_dirty_l1range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid,
|
|||||||
for (; db != NULL; db = AVL_NEXT(&dn->dn_dbufs, db)) {
|
for (; db != NULL; db = AVL_NEXT(&dn->dn_dbufs, db)) {
|
||||||
if (db->db_level != 1 || db->db_blkid >= end_blkid)
|
if (db->db_level != 1 || db->db_blkid >= end_blkid)
|
||||||
break;
|
break;
|
||||||
ASSERT(db->db_dirtycnt > 0);
|
if (db->db_state != DB_EVICTING)
|
||||||
|
ASSERT(db->db_dirtycnt > 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
mutex_exit(&dn->dn_dbufs_mtx);
|
mutex_exit(&dn->dn_dbufs_mtx);
|
||||||
|
Loading…
Reference in New Issue
Block a user