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
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jun 15 2021, 11:56 PM
Parents
rGa416b29e16c7: Added uncompress requirement
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGbd83c1e0c6f9: Do not hash unlinked inodes (authored by Paul Zuchowski <31706010+PaulZ-98@users.noreply.github.com>).Jun 15 2021, 11:56 PM