anchor.diff:                                 true  -> Src;
                                  false -> hd(Gots)
                              end,
  -                 {copy, A, Missing};
  +                 [ets:update_counter(ETS, {directive_bytes, FLU}, Size) ||
  +                     FLU <- Missing],
  +                 if Missing == [] ->
  +                         noop;
  +                    true ->
  +                         {copy, A, Missing}
  +                 end;
               ConsistencyMode == cp_mode ->
                    exit({todo_cp_mode, ?MODULE, ?LINE})
            end,
  +    Acc2 = if Do == noop -> Acc;
  +              true       -> [Do|Acc]
  +           end,
       make_repair_directives3(Rest1,
                               ConsistencyMode, RepairMode,
  -                            File, Verb, Src, FLUs, ProxiesDict, ETS, [Do|Acc]).
  +                            File, Verb, Src, FLUs, ProxiesDict, ETS, Acc2).
   
   take_same_offset_size(L, Offset, Size) ->
       take_same_offset_size(L, Offset, Size, []).
  
positive.code: %%    destination FLU.
  %%    As an additional optimization, add a bit of #2 to start the next
  %%    read while the current write is still in progress.
  
  repair_file(cp_mode=_ConsistencyMode, RepairMode,
              File, Size, MissingList, Verb, Src, _FLUs, ProxiesDict, ETS) ->
      %% TODO bit rot, fix for CP mode, yo
      case lists:member(Src, MissingList) of
          true ->
              ?VERB("~p: ~s -> ~p, skipping: not on source server\n",
                    [Src, File, MissingList]);
          false when RepairMode == check ->
              ?VERB("~p: ~s -> ~p, copy ~s MB (skipped)\n",
                    [Src, File, MissingList, mbytes(Size)]);
          false ->
              ?VERB("~p: ~s -> ~p, copy ~s MB, ",
                    [Src, File, MissingList, mbytes(Size)]),
              MissingProxiesDict =
                  orddict:filter(fun(K, _V) -> lists:member(K, MissingList) end,
                                 ProxiesDict),
              SrcProxy = orddict:fetch(Src, ProxiesDict),
              ok = copy_file(File, SrcProxy, MissingProxiesDict, Verb, ETS),
              ?VERB("done\n", [])
      end.
  
  
  copy_file(File, SrcProxy, MissingProxiesDict, Verb, ETS) ->
      %% Use the first source socket to enumerate the chunks & checksums.
      %% Use the second source socket to copy each chunk.
      N = length(orddict:to_list(MissingProxiesDict)),
      {ok, EpochID} = machi_proxy_flu1_client:get_epoch_id(SrcProxy,
                                                           ?SHORT_TIMEOUT),
      {ok, CheckSums} = machi_proxy_flu1_client:checksum_list(
                          SrcProxy, EpochID, File, ?LONG_TIMEOUT),
      EtsKeys = [{in_files, t_in_files}, {in_chunks, t_in_chunks},
                 {in_bytes, t_in_bytes}, {out_files, t_out_files},
                 {out_chunks, t_out_chunks}, {out_bytes, t_out_bytes}],
      [ets:insert(ETS, {L_K, 0}) || {L_K, _T_K} <- EtsKeys],
      CopyChunks =
          fun({Offset, Size, CSum}, {ok, ETab, _, _} = Acc) ->
                  case ets:lookup_element(ETab, in_chunks, 2) rem 100 of
                      0 -> ?VERB(".", []);
                      _ -> ok
                  end,
                  _T1 = os:timestamp(),
                  {ok, Chunk} = machi_proxy_flu1_client:read_chunk(
                                  SrcProxy, EpochID, File, Offset, Size,
                                  ?SHORT_TIMEOUT),
                  _T2 = os:timestamp(),
                  case machi_util:checksum_chunk(Chunk) of
                      CSum_now when CSum_now == CSum ->
                          [begin
                               _T3 = os:timestamp(),
                               ok = machi_proxy_flu1_client:write_chunk(
                                      DstProxy, EpochID, File, Offset, Chunk,
                                      ?SHORT_TIMEOUT),
                               _T4 = os:timestamp()
                           end || {_FLU, DstProxy} <- MissingProxiesDict],
                          ets:update_counter(ETab, in_chunks, 1),
                          ets:update_counter(ETab, in_bytes, Size),
                          ets:update_counter(ETab, out_chunks, N),
                          ets:update_counter(ETab, out_bytes, N*Size),
                          Acc;
                      CSum_now ->
                          error_logger:error_msg(
                            "TODO: Checksum failure: "
                            "file ~p offset ~p size ~p: "
                            "expected ~p got ~p\n",
                            [File, Offset, Size, CSum, CSum_now]),
                          ets:update_counter(ETab, t_bad_chunks, 1),
                          Acc
                  end;
             (_, _=Acc) ->                        % failure: skip rest of file
                  Acc
          end,
      ets:update_counter(ETS, t_in_files, 1),
      ets:update_counter(ETS, t_out_files, N),
      _CopyRes = lists:foldl(CopyChunks, {ok, ETS, x, x}, CheckSums),
      ?VERB("copied ~w chunks to ~w chunks, ",
            [ets:lookup_element(ETS, K, 2) || K <- [in_chunks, out_chunks] ]),
  
      %% Copy this file's stats to the total counts.
      [ets:update_counter(ETS, T_K, ets:lookup_element(ETS, L_K, 2)) ||
          {L_K, T_K} <- EtsKeys],
      ok.
  
  make_repair_compare_fun(SrcFLU) ->
      fun({{Offset_X, _Sz_a, _Cs_a, FLU_a}, _N_a},
  
negative.code:             T_a =< T_b
      end.
  
  make_repair_directives(ConsistencyMode, RepairMode, File, Size, EpochID,
                         Verb, Src, FLUs0, ProxiesDict, ETS) ->
      true = (Size < ?MAX_OFFSET),
      FLUs = lists:usort(FLUs0),
      C0 = [begin
                %% erlang:garbage_collect(),
                Proxy = orddict:fetch(FLU, ProxiesDict),
  