HomeFreeBSD

Fix embedded bp accounting in count_block()

Description

Fix embedded bp accounting in count_block()

Currently, count_block() does not correctly account for the
possibility that the bp that is passed to it could be embedded.
These blocks shouldn't be counted since the work of scanning
these blocks in already handled when the containing block is
scanned. This patch simply resolves this issue by returning
early in this case.

Reviewed by: Allan Jude <allanjude@freebsd.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Authored-by: Bill Sommerfeld <sommerfeld@alum.mit.edu>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8800
Closes #8766

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on May 25 2019, 8:52 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 25 2019, 8:52 PM
Parents
rG8e3c3ed1b3b2: Disable parallel processing for 'zfs mount -l'
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG3b61ca3e5785: Fix embedded bp accounting in count_block() (authored by Tom Caputi <tcaputi@datto.com>).May 25 2019, 8:52 PM