summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
authorHATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>2016-09-27 00:36:20 +0900
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-09-26 11:36:20 -0400
commiteeb084806be1cc7f579d61634fe7b9b3dd5b3df9 (patch)
treea34fae9a3b27c73007d58cf347ccac4eb9a0990c /src/core/socket.c
parenta5ca3649d34c5649ca04fc81000a80e476a81a64 (diff)
journald,ratelimit: fix wrong calculation of burst_modulate() (#4218)
This patch fixes wrong calculation of burst_modulate(), which now calculates the values smaller than really expected ones if available disk space is strictly more than 1MB. In particular, if available disk space is strictly more than 1MB and strictly less than 16MB, the resulted value becomes smaller than its original one. >>> (math.log2(1*1024**2)-16) / 4 1.0 >>> (math.log2(16*1024**2)-16) / 4 2.0 >>> (math.log2(256*1024**2)-16) / 4 3.0 → This matches the comment in the function.
Diffstat (limited to 'src/core/socket.c')
0 files changed, 0 insertions, 0 deletions