anchor.diff:  %% bucket_props - bucket properties
   %% preflist2 - [{{Idx,Node},primary|fallback}] preference list
   %% 
  -test(ReqId,Bucket,Key,R,Timeout,From,StateProps) ->
  -    gen_fsm:start(?MODULE, {test, [ReqId,Bucket,Key,R,Timeout,From], StateProps}, []).
  -
  -%% As test, but linked to the caller
   test_link(ReqId,Bucket,Key,R,Timeout,From,StateProps) ->
  -    gen_fsm:start_link(?MODULE, {test, [ReqId,Bucket,Key,R,Timeout,From], StateProps}, []).
  +    test_link({raw, ReqId, From}, Bucket, Key, [{r, R}, {timeout, Timeout}], StateProps).
  +
  +test_link(From, Bucket, Key, GetOptions, StateProps) ->
  +    gen_fsm:start_link(?MODULE, {test, [From, Bucket, Key, GetOptions], StateProps}, []).
  +
   -endif.
   
   %% @private
  -init([ReqId,Bucket,Key,R,Timeout,Client]) ->
  +init([From, Bucket, Key, Options]) ->
       StartNow = now(),
  -    StateData = #state{client=Client,r=R, timeout=Timeout,
  -                       req_id=ReqId, bkey={Bucket,Key},
  -                       startnow=StartNow},
  -    {ok,prepare,StateData,0};
  +    StateData = #state{from = From,
  +                       options = Options,
  +                       bkey = {Bucket, Key},
  +                       startnow = StartNow},
  +    {ok, prepare, StateData, 0};
   init({test, Args, StateProps}) ->
       %% Call normal init
       {ok, prepare, StateData, 0} = init(Args),
  
positive.code:                 startnow :: {pos_integer(), pos_integer(), pos_integer()}
                 }).
  
  %% In place only for backwards compatibility
  start(ReqId,Bucket,Key,R,Timeout,From) ->
      start_link(ReqId,Bucket,Key,R,Timeout,From).
  
  start_link(ReqId,Bucket,Key,R,Timeout,From) ->
      gen_fsm:start_link(?MODULE, [ReqId,Bucket,Key,R,Timeout,From], []).
  
  -ifdef(TEST).
  %% Create a get FSM for testing.  StateProps must include
  
negative.code:     N = proplists:get_value(n_val,BucketProps),
      UpNodes = riak_core_node_watcher:nodes(riak_kv),
      Preflist2 = riak_core_apl:get_apl_ann(DocIdx, N, Ring, UpNodes),
      {next_state, validate, StateData#state{starttime=riak_core_util:moment(),
                                            n = N,
                                            bucket_props=BucketProps,
                                            preflist2 = Preflist2}, 0}.
  
  validate(timeout, StateData=#state{from = {raw, ReqId, _Pid}, options = Options,
                                     n = N, bucket_props = BucketProps}) ->
      Timeout = get_option(timeout, Options, ?DEFAULT_TIMEOUT),
      R0 = get_option(r, Options, ?DEFAULT_R),
      R = riak_kv_util:expand_rw_value(r, R0, BucketProps, N),
      if
          R =:= error ->
              client_reply({error, {r_val_violation, R0}}, StateData),
              {stop, normal, StateData};
          R > N ->
              client_reply({error, {n_val_violation, N}}, StateData),
              {stop, normal, StateData};
          true ->
              FailThreshold = erlang:min((N div 2)+1, % basic quorum, or
                                         (N-R+1)), % cannot ever get R 'ok' replies
              AllowMult = proplists:get_value(allow_mult,BucketProps),
              {next_state, execute, StateData#state{r = R,
                                                    fail_threshold = FailThreshold,
                                                    timeout = Timeout,
                                                    allowmult = AllowMult,
                                                    req_id = ReqId}, 0}
      end.
  
  %% @private
  execute(timeout, StateData0=#state{timeout=Timeout,req_id=ReqId,
                                     bkey=BKey, 
                                     
                                     preflist2 = Preflist2}) ->
      TRef = schedule_timeout(Timeout),
      Preflist = [IndexNode || {IndexNode, _Type} <- Preflist2],
      riak_kv_vnode:get(Preflist, BKey, ReqId),
      StateData = StateData0#state{tref=TRef},
      {next_state,waiting_vnode_r,StateData}.
  
  waiting_vnode_r({r, VnodeResult, Idx, _ReqId}, StateData) ->
      NewStateData1 = add_vnode_result(Idx, VnodeResult, StateData),
  