aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/disk_log.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/src/disk_log.erl')
-rw-r--r--lib/kernel/src/disk_log.erl13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/kernel/src/disk_log.erl b/lib/kernel/src/disk_log.erl
index d06429d629..8dd9975b23 100644
--- a/lib/kernel/src/disk_log.erl
+++ b/lib/kernel/src/disk_log.erl
@@ -1695,7 +1695,7 @@ do_unblock(L, S) ->
do_log(L, B) when L#log.type =:= halt ->
#log{format = Format, extra = Halt} = L,
#halt{curB = CurSize, size = Sz} = Halt,
- {Bs, BSize} = bsize(B, Format),
+ {Bs, BSize} = logl(B, Format),
case get(is_full) of
true ->
{error, {error, {full, L#log.name}}, 0};
@@ -1731,17 +1731,14 @@ do_log(L, B) when L#log.format_type =:= wrap_ext ->
{error, Error, Logged - Lost}
end.
-bsize(B, external) ->
- {B, xsz(B, 0)};
-bsize(B, internal) ->
+logl(B, external) ->
+ {B, iolist_size(B)};
+logl(B, internal) ->
disk_log_1:logl(B).
-xsz([B|T], Sz) -> xsz(T, byte_size(B) + Sz);
-xsz([], Sz) -> Sz.
-
halt_write_full(L, [Bin | Bins], Format, N) ->
B = [Bin],
- {Bs, BSize} = bsize(B, Format),
+ {Bs, BSize} = logl(B, Format),
Halt = L#log.extra,
#halt{curB = CurSize, size = Sz} = Halt,
if