anchor.diff:  
   -spec do_log(#log{}, [binary()]) -> integer() | {'error', _, integer()}.
   
  -do_log(L, B) when L#log.type =:= halt ->
  +do_log(L, B) ->
  +    do_log(L, B, iolist_size(B)).
  +
  +do_log(L, B, BSz) when L#log.type =:= halt ->
       #log{format = Format, extra = Halt} = L,
       #halt{curB = CurSize, size = Sz} = Halt,
  -    {Bs, BSize} = logl(B, Format),
  +    {Bs, BSize} = logl(B, Format, BSz),
       case get(is_full) of
   	true ->
               {error, {error, {full, L#log.name}}, 0};
  
positive.code: 	    put(log, L#log{extra = Handle}),
  	    {error, Error, Logged - Lost}
      end;
  do_log(L, B) when L#log.format_type =:= wrap_ext ->
      case disk_log_1:mf_ext_log(L#log.extra, B, L#log.head) of
  	{ok, Handle, Logged, Lost, Wraps} ->
  	    notify_owners_wrap(Wraps),
  
negative.code:     log_loop(S, [From | Pids], [B | Bins], Sync, Sz+iolist_size(B), F);
  log_loop({From, sync}, Pids, Bins, Sync, Sz, F, S) ->
      log_loop(S, Pids, Bins, [From | Sync], Sz, F);
  log_loop(Message, Pids, Bins, Sync, Sz, _F, S) ->
      NS = log_end(S, Pids, Bins, Sync, Sz),
      handle(Message, NS).
  
  log_end(S, [], [], Sync, _Sz) ->
      log_end_sync(S, Sync);
  log_end(S, Pids, Bins, Sync, Sz) ->
      case do_log(get(log), rflat(Bins), Sz) of
  	N when is_integer(N) ->
  	    ok = replies(Pids, ok),
  	    S1 = (state_ok(S))#state{cnt = S#state.cnt+N},
  