anchor.diff:                                      {error, partition};
                                  true ->
                                       do_append_head2(Prefix, Chunk, ChunkExtra,
  -                                                    Depth, STime, S2)
  +                                                    Depth, STime, TO, S2)
                               end;
                           RestFLUs3 ->
                               do_append_midtail2(RestFLUs3, Prefix, File, Offset,
                                                  Chunk, ChunkExtra,
  -                                               Ws, Depth + 1, STime, S2)
  +                                               Ws, Depth + 1, STime, TO, S2)
                       end
               end
       end.            
   
   do_append_midtail2([], _Prefix, File, Offset, Chunk,
  -                   _ChunkExtra, _Ws, _Depth, _STime, S) ->
  +                   _ChunkExtra, _Ws, _Depth, _STime, _TO, S) ->
       %% io:format(user, "ok!\n", []),
       {reply, {ok, {Offset, chunk_wrapper_size(Chunk), File}}, S};
   do_append_midtail2([FLU|RestFLUs]=FLUs, Prefix, File, Offset, Chunk,
  -                   ChunkExtra, Ws, Depth, STime,
  +                   ChunkExtra, Ws, Depth, STime, TO,
                      #state{epoch_id=EpochID, proxies_dict=PD}=S) ->
       Proxy = orddict:fetch(FLU, PD),
       case ?FLU_PC:write_chunk(Proxy, EpochID, File, Offset, Chunk, ?TIMEOUT) of
           ok ->
               %% io:format(user, "write ~w,", [FLU]),
               do_append_midtail2(RestFLUs, Prefix, File, Offset, Chunk,
  -                               ChunkExtra, [FLU|Ws], Depth, STime, S);
  +                               ChunkExtra, [FLU|Ws], Depth, STime, TO, S);
           {error, bad_checksum}=BadCS ->
               %% TODO: alternate strategy?
               {reply, BadCS, S};
           {error, Retry}
             when Retry == partition; Retry == bad_epoch; Retry == wedged ->
               do_append_midtail(FLUs, Prefix, File, Offset, Chunk,
  -                              ChunkExtra, Ws, Depth, STime, S);
  +                              ChunkExtra, Ws, Depth, STime, TO, S);
           {error, written} ->
               %% We know what the chunk ought to be, so jump to the
               %% middle of read-repair.
  
positive.code:             false
      end.
  
  do_write_head(File, Offset, Chunk, 0=Depth, STime, S) ->
      do_write_head2(File, Offset, Chunk, Depth + 1, STime, S);
  do_write_head(File, Offset, Chunk, Depth, STime, #state{proj=P}=S) ->
      %% io:format(user, "head sleep1,", []),
      sleep_a_while(Depth),
      DiffMs = timer:now_diff(os:timestamp(), STime) div 1000,
      if DiffMs > ?MAX_RUNTIME ->
              {reply, {error, partition}, S};
         true ->
              %% This is suboptimal for performance: there are some paths
  
negative.code:             case S2#state.proj of
                  P2 when P2 == undefined orelse
                          P2#projection_v1.upi == [] ->
                      do_list_files(Depth + 1, STime, TO, S2);
                  _ ->
                      do_list_files2(Depth + 1, STime, TO, S2)
              end
      end.
  
  do_list_files2(Depth, STime, TO,
                    #state{epoch_id=EpochID, proj=P, proxies_dict=PD}=S) ->
      Proxy = orddict:fetch(lists:last(readonly_flus(P)), PD),
      case ?FLU_PC:list_files(Proxy, EpochID, ?TIMEOUT) of
  