anchor.diff:  
   -export([
            sum_user/2,
  -         sum_bucket/2,
  +         sum_bucket/1,
            make_object/4,
            get_usage/4,
            archive_period/0
  
positive.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},
                none, true}],
      ok = riak_cs_riak_client:set_bucket_name(RcPid, BucketName),
      {ok, ManifestPbc} = riak_cs_riak_client:manifest_pbc(RcPid),
      ManifestBucket = riak_cs_utils:to_bucket_name(objects, BucketName),
      case riakc_pb_socket:mapred(ManifestPbc, ManifestBucket, Query) of
          {ok, Results} ->
              {1, [{Objects, Bytes}]} = lists:keyfind(1, 1, Results),
              {struct, [{<<"Objects">>, Objects},
                        {<<"Bytes">>, Bytes}]};
          {error, Error} ->
              {error, Error}
      end.
  
  object_size_map({error, notfound}, _, _) ->
  
negative.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(string(), cs_bucket()) ->
                                {binary(), [{binary(), integer()}]} |
                                {binary(), binary()}.
  maybe_sum_bucket(User, ?RCS_BUCKET{name=Name} = Bucket) when is_list(Name) ->
      maybe_sum_bucket(User, Bucket?RCS_BUCKET{name=list_to_binary(Name)});
  maybe_sum_bucket(User, ?RCS_BUCKET{name=Name} = _Bucket) when is_binary(Name) ->
      case sum_bucket(Name) of
          {struct, _} = BucketUsage -> {Name, BucketUsage};
          {error, _} = E ->
              _ = lager:error("failed to calculate usage of "
  