HomeFreeBSD

Do not hash unlinked inodes

Description

Do not hash unlinked inodes

In zfs_znode_alloc we always hash inodes. If the
znode is unlinked, we do not need to hash it. This
fixes the problem where zfs_suspend_fs is doing zrele
(iput) in an async fashion, and zfs_resume_fs unlinked
drain processing will try to hash an inode that could
still be hashed, resulting in a panic.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alan Somers <asomers@gmail.com>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes #9741
Closes #11223
Closes #11648
Closes #12210

Details

Provenance
Paul Zuchowski <31706010+PaulZ-98@users.noreply.github.com>Authored on Jun 12 2021, 12:00 AM
GitHub <noreply@github.com>Committed on Jun 12 2021, 12:00 AM
Parents
rG10bcc4da6cec: scripts/commitcheck.sh: fix false positive for signed commits
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGafa7b3484556: Do not hash unlinked inodes (authored by Paul Zuchowski <31706010+PaulZ-98@users.noreply.github.com>).Jun 12 2021, 12:00 AM