HomeFreeBSD

Livelist logic should handle dedup blkptrs

Description

Livelist logic should handle dedup blkptrs

Update the logic to handle the dedup-case of consecutive
FREEs in the livelist code. The logic still ensures that
all the FREE entries are matched up with a respective
ALLOC by keeping a refcount for each FREE blkptr that we
encounter and ensuring that this refcount gets to zero
by the time we are done processing the livelist.

zdb -y no longer panics when encountering double frees

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Don Brady <don.brady@delphix.com>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #11480
Closes #12177

Details

Provenance
Serapheim Dimitropoulos <serapheim@delphix.com>Authored on Jun 7 2021, 7:09 PM
GitHub <noreply@github.com>Committed on Jun 7 2021, 7:09 PM
Parents
rGea400129c376: More aggsum optimizations
Branches
Unknown
Tags
Unknown