anchor.diff:  %% @doc Sum the number of bytes stored in active files in all of the
   %% given user's directories.  The result is a list of pairs of
   %% `{BucketName, Bytes}`.
  --spec sum_user(pid(), string()) -> {ok, [{string(), integer()}]}
  +-spec sum_user(riak_client(), string()) -> {ok, [{string(), integer()}]}
                                    | {error, term()}.
  -sum_user(Riak, User) when is_binary(User) ->
  -    sum_user(Riak, binary_to_list(User));
  -sum_user(Riak, User) when is_list(User) ->
  -    case riak_cs_utils:get_user(User, Riak) of
  +sum_user(RcPid, User) when is_binary(User) ->
  +    sum_user(RcPid, binary_to_list(User));
  +sum_user(RcPid, User) when is_list(User) ->
  +    case riak_cs_utils:get_user(User, RcPid) of
           {ok, {?RCS_USER{buckets=Buckets}, _UserObj}} ->
  -            BucketUsages = [maybe_sum_bucket(Riak, User, B)
  -                            || ?RCS_BUCKET{name=B} <- Buckets],
  +            BucketUsages = [maybe_sum_bucket(RcPid, User, B) || B <- Buckets],
               {ok, BucketUsages};
           {error, Error} ->
               {error, Error}
  
positive.code: %%      This log is *very* important because unless this log
  %%      there are no other way for operator to know a calculation
  %%      which riak_cs_storage_d failed.
  -spec maybe_sum_bucket(pid(), string(), string()|binary()) ->
                                {binary(), [{binary(), integer()}]} |
                                {binary(), binary()}.
  maybe_sum_bucket(Riak, User, Bucket) when is_list(Bucket)->
      maybe_sum_bucket(Riak, User, list_to_binary(Bucket));
  maybe_sum_bucket(Riak, User, Bucket) when is_binary(Bucket)->
      case sum_bucket(Riak, Bucket) of
          {struct, _} = BucketUsage -> {Bucket, BucketUsage};
          {error, _} = E ->
              _ = lager:error("failed to calculate usage of "
                              "bucket '~s' of user '~s'. Reason: ~p",
                              [Bucket, User, E]),
              {Bucket, iolist_to_binary(io_lib:format("~p", [E]))}
      end.
  
  %% @doc Sum the number of bytes stored in active files in the named
  
negative.code: %% The result is a mochijson structure with two fields: `Objects',
  %% which is the number of objects that were counted in the bucket, and
  %% `Bytes', which is the total size of all of those objects.
  -spec sum_bucket(riak_client(), binary()) -> {struct, [{binary(), integer()}]}
                                     | {error, term()}.
  sum_bucket(RcPid, BucketName) ->
      Query = [{map, {modfun, riak_cs_storage, object_size_map},
                [do_prereduce], false},
               {reduce, {modfun, riak_cs_storage, object_size_reduce},
  