HomeFreeBSD

Fix dnode_hold_impl() soft lockup

Description

Fix dnode_hold_impl() soft lockup

Soft lockups could happen when multiple threads trying
to get zrl on the same dnode handle in order to allocate
and initialize the dnode marked as DN_SLOT_ALLOCATED.

Don't loop from beginning when we can't get zrl, otherwise
we would increase the zrl refcount and nobody can actually
lock it.

Reviewed by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Closes #8433

Details

Provenance
lidongyang <gnaygnodil@gmail.com>Authored on Feb 22 2019, 5:48 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 22 2019, 5:48 PM
Parents
rGf8bb2a7e0c88: Clarify zpool iostat statistics reporting
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG8d9e51c08480: Fix dnode_hold_impl() soft lockup (authored by lidongyang <gnaygnodil@gmail.com>).Feb 22 2019, 5:48 PM