anchor.diff:      Offset = ReqId rem NVal,
   
       RingSize = chashbin:num_partitions(CHBin),
  -    RingIndexInc = chash:ring_increment(RingSize),
   
       UpNodes = riak_core_node_watcher:nodes(Service),
       SubpList =
  
positive.code: 
  %% @private
  %% @doc Find the N key spaces for a VNode. These are *not* the same as
  %% the filters for the traditional cover plans; the filters are
  %% incremented by 1
  -spec n_keyspaces(vnode_id(), pos_integer()) -> list(partition_id()).
  n_keyspaces({vnode_id, VNode, RingSize, RingIndexInc}, N) ->
      ordsets:from_list([{partition_id, X rem RingSize, RingSize, RingIndexInc} ||
                            X <- lists:seq(RingSize + VNode - N,
                                           RingSize + VNode - 1)]).
  
  
negative.code:     %% If we start at the bottom of the hash range (partition 0),
      %% return the top of the range
      (1 bsl 160) - 1;
  convert({partition_id, _ID, _RingSize}=PartID, doc_index) ->
      convert(PartID, partition_index) - 1;
  convert({partition_id, PartitionID, RingSize}, partition_index) ->
      PartitionID * chash:ring_increment(RingSize);
  convert({vnode_id, VNodeID, RingSize}, vnode_index) ->
      VNodeID * chash:ring_increment(RingSize);
  convert({vnode_id, VNodeID, _RingSize}, int) ->
      VNodeID;
  convert({partition_id, PartitionID, _RingSize}, int) ->
      PartitionID;
  convert({SubpID, Bits}, subpartition_index) ->
      SubpID bsl Bits.
  
  %% @private
  increment_vnode({vnode_id, Position, RingSize}, Offset) ->
      {vnode_id, (Position + Offset) rem RingSize, RingSize}.
  
  %% @private
  list_all_vnode_ids(RingSize) ->
      lists:map(fun(Id) -> {vnode_id, Id, RingSize} end,
                lists:seq(0, RingSize - 1)).
  
  
  %% @private
  -spec identify_unavailable_vnodes(chashbin:chashbin(), pos_integer(), atom()) -> list(vnode_id()).
  identify_unavailable_vnodes(CHBin, RingSize, Service) ->
      PartitionSize = chash:ring_increment(RingSize),
  
      %% Get a list of the VNodes owned by any unavailable nodes
      [{vnode_id, Index div PartitionSize, RingSize} ||
          {Index, _Node}
              <- riak_core_apl:offline_owners(Service, CHBin)].
  
  