mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 10:21:01 +03:00
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
This commit is contained in:
parent
b746c397e3
commit
69ae34076f
@ -3629,6 +3629,13 @@ count_block(dsl_scan_t *scn, zfs_all_blkstats_t *zab, const blkptr_t *bp)
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Don't count embedded bp's, since we already did the work of
|
||||
* scanning these when we scanned the containing block.
|
||||
*/
|
||||
if (BP_IS_EMBEDDED(bp))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Update the spa's stats on how many bytes we have issued.
|
||||
* Sequential scrubs create a zio for each DVA of the bp. Each
|
||||
|
Loading…
Reference in New Issue
Block a user