anchor.diff:                            couch_db:close(Db)
                         end,
   
  -                  VFileSize = proplists:get_value(disk_size, DbInfo),
  -                  VDataSize = proplists:get_value(data_size, DbInfo, 0),
  +                  {VDataSize, VFileSize} = db_size_info(DbInfo),
                     {AccDataSize + VDataSize, AccFileSize + VFileSize}
             end, {0, 0}, SampleVBucketDbs),
   
  
positive.code:                   [ [{type, vbucket},
                       {name, element(2, VBucketAndDbName)},
                       {important, false},
                       {fa, {fun spawn_vbucket_compactor/3,
                             [BucketName, VBucketAndDbName, Options]}},
                       {on_success,
                        {fun update_bucket_compaction_progress/2, [Ix, Total]}}] ||
                        {Ix, VBucketAndDbName} <- misc:enumerate(VBucketDbs) ],
  
negative.code:              round(FileSize * (NumVBuckets / NumSamples))}
      end.
  
  db_size_info(DbInfo) ->
      FileSize = proplists:get_value(disk_size, DbInfo),
      DataSize = proplists:get_value(data_size, DbInfo, 0),
  
      {DataSize, FileSize}.
  
  check_fragmentation({FragLimit, FragSizeLimit}, Frag, FragSize) ->
      true = is_integer(FragLimit),
      true = is_integer(FragSizeLimit),
  
      (Frag >= FragLimit) orelse (FragSize >= FragSizeLimit).
  
  ensure_can_db_compact(Db, {DataSize, _}) ->
      SpaceRequired = space_required(DataSize),
  
      {ok, DbDir} = ns_storage_conf:this_node_dbdir(),
  