mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Illumos 5630 - stale bonus buffer in recycled dnode_t leads to data corruption
5630 stale bonus buffer in recycled dnode_t leads to data corruption Author: Justin T. Gibbs <justing@spectralogic.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george@delphix.com> Reviewed by: Will Andrews <will@freebsd.org> Approved by: Robert Mustacchi <rm@joyent.com> References: https://www.illumos.org/issues/5630 https://github.com/illumos/illumos-gate/commit/cd485b4 Ported-by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <ryao@gentoo.org> Issue #3172
This commit is contained in:
committed by
Brian Behlendorf
parent
73ad4a9f3c
commit
4c7b7eedcd
@@ -454,6 +454,12 @@ dnode_evict_dbufs(dnode_t *dn)
|
||||
if (pass >= 100)
|
||||
dprintf("Required %d passes to evict dbufs\n", pass);
|
||||
|
||||
dnode_evict_bonus(dn);
|
||||
}
|
||||
|
||||
void
|
||||
dnode_evict_bonus(dnode_t *dn)
|
||||
{
|
||||
rw_enter(&dn->dn_struct_rwlock, RW_WRITER);
|
||||
if (dn->dn_bonus && refcount_is_zero(&dn->dn_bonus->db_holds)) {
|
||||
mutex_enter(&dn->dn_bonus->db_mtx);
|
||||
|
||||
Reference in New Issue
Block a user