diff --git a/pkg/common/utils.go b/pkg/common/utils.go index 6b71feb78..f92cd46d9 100644 --- a/pkg/common/utils.go +++ b/pkg/common/utils.go @@ -70,11 +70,12 @@ func BytesToGbRoundDown(bytes int64) int64 { } func BytesToGbRoundUp(bytes int64) int64 { - re := bytes / (1024 * 1024 * 1024) - if (bytes % (1024 * 1024 * 1024)) != 0 { + // TEST: verify that rounding to 4GiB works correctly + re := bytes / (1024 * 1024 * 1024 * 4) + if (bytes % (1024 * 1024 * 1024 * 4)) != 0 { re++ } - return re + return 4 * re } func GbToBytes(Gb int64) int64 {