anchor.diff:  %%      is a vnode_coverage record, that means we've previously
   %%      generated a coverage plan and we're being fed back one
   %%      element of it. Return that element in the proper format.
  --spec create_plan(vnode_selector(), pos_integer(), pos_integer(),
  +-spec create_plan(vnode_selector(),
  +                  pos_integer()|
  +                  {pos_integer(), pos_integer(), pos_integer()},
  +                  pos_integer(),
                     req_id(), atom()) ->
                            {error, term()} | coverage_plan() | subp_plan().
   create_plan(#vnode_coverage{vnode_identifier=TargetHash,
  
positive.code:                               AvailableKeySpaces,
                                ResultsAcc) of
          {ok, CoverageResults} ->
              UpdateResultsFun =
                  fun({Key, NewValues}, Results) ->
                          case proplists:get_value(Key, Results) of
                              undefined ->
                                  [{Key, NewValues} | Results];
                              Values ->
                                  UniqueValues = lists:usort(Values ++ NewValues),
                                  [{Key, UniqueValues} |
                                   proplists:delete(Key, Results)]
                          end
                  end,
              UpdatedResults =
                  lists:foldl(UpdateResultsFun, ResultsAcc, CoverageResults),
              find_coverage(AllKeySpaces,
                            Offset,
                            NVal,
                            PartitionCount,
                            UnavailableKeySpaces,
                            PVC-1,
                            UpdatedResults);
          Error ->
              Error
      end.
  
  %% @private
  %% @doc Find the N key spaces for a VNode
  n_keyspaces(VNode, N, PartitionCount) ->
      ordsets:from_list([X rem PartitionCount ||
                            X <- lists:seq(PartitionCount + VNode - N,
  
negative.code:                          <- riak_core_apl:offline_owners(Service, CHBin)],
      [(DownVNode div PartitionSize) || DownVNode <- DownVNodes].
  
  %% @private
  merge_coverage_results({VnodeId, PartitionIds}, Acc) ->
      case proplists:get_value(VnodeId, Acc) of
          undefined ->
              [{VnodeId, PartitionIds} | Acc];
          MorePartitionIds ->
              UniqueValues =
                  lists:usort(PartitionIds ++ MorePartitionIds),
              [{VnodeId, UniqueValues} |
               proplists:delete(VnodeId, Acc)]
      end.
  
  
  %% @private
  %% @doc Generates a minimal set of vnodes and partitions to find the requested data
  -spec find_minimal_coverage(list(partition_id()), non_neg_integer(), non_neg_integer(), non_neg_integer(), list(partition_id()), non_neg_integer(), list({vnode_id(), list(partition_id())})) -> {ok, list({vnode_id(), list(partition_id())})} | {error, term()}.
  find_minimal_coverage(_AllKeySpaces, _Offset, _NVal, _PartitionCount,
                _UnavailableKeySpaces, 0, Results) ->
      {ok, Results};
  find_minimal_coverage(AllKeySpaces,
                        Offset,
                        NVal,
                        PartitionCount,
                        UnavailableKeySpaces,
                        PVC,
                        ResultsAcc) ->
      %% Calculate the available keyspaces. The list of
      %% keyspaces for each vnode that have already been
      %% covered by the plan are subtracted from the complete
  