HomeFreeBSD

Simplify/fix dnode_move() for dn_zfetch

Description

Simplify/fix dnode_move() for dn_zfetch

Previous code tried to keep prefetch streams while moving dnode. But
it was at least not updating per-stream zs_fetchback pointers, causing
use-after-free on next access. Instead of that I see much easier and
cleaner to just drop old prefetch state and start new from scratch.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #11936
Closes #11998

Details

Provenance
mavAuthored on May 7 2021, 10:07 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 10 2021, 7:13 PM
Parents
rG85071b2ff5ad: FreeBSD: Initialize/destroy zp->z_lock
Branches
Unknown
Tags
Unknown

Event Timeline