mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
BRT: Fix slop space calculation with block cloning
Similar to deduplication, the size of data duplicated by block cloning should not be included in the slop space calculation. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Yuxin Wang <yuxinwang9999@gmail.com> Closes #15874
This commit is contained in:
parent
36116b4612
commit
fc3d34bd08
1 changed files with 2 additions and 1 deletions
|
|
@ -1822,7 +1822,8 @@ spa_get_slop_space(spa_t *spa)
|
||||||
* deduplicated data, so since it's not useful to reserve more
|
* deduplicated data, so since it's not useful to reserve more
|
||||||
* space with more deduplicated data, we subtract that out here.
|
* space with more deduplicated data, we subtract that out here.
|
||||||
*/
|
*/
|
||||||
space = spa_get_dspace(spa) - spa->spa_dedup_dspace;
|
space =
|
||||||
|
spa_get_dspace(spa) - spa->spa_dedup_dspace - brt_get_dspace(spa);
|
||||||
slop = MIN(space >> spa_slop_shift, spa_max_slop);
|
slop = MIN(space >> spa_slop_shift, spa_max_slop);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue