Currently we don't copy the actual_stats field during reshard, which makes
resharded buckets show a size_utilized as 0, which further has the problem that
a subsequent object removal would subtract the object size from the 0 size
utilized showing up large uint64_t values. Copy the size_actual from the source
object in both cls and in reshard_process. This will fix the new buckets,
existing buckets will still have to go through a bucket check --fix for their
stats to be corrected.
Fixes: http://tracker.ceph.com/issues/36290
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
dest.total_size += s.second.total_size;
dest.total_size_rounded += s.second.total_size_rounded;
dest.num_entries += s.second.num_entries;
+ dest.actual_size += s.second.actual_size;
}
}
accounted_stats->num_entries++;
accounted_stats->total_size += entry.meta.accounted_size;
accounted_stats->total_size_rounded += cls_rgw_get_rounded_size(entry.meta.accounted_size);
+ accounted_stats->actual_size += entry.meta.size;
account = true;
}
break;
target.num_entries += entry_stats.num_entries;
target.total_size += entry_stats.total_size;
target.total_size_rounded += entry_stats.total_size_rounded;
+ target.actual_size += entry_stats.actual_size;
}
if (entries.size() >= RESHARD_SHARD_WINDOW) {
int ret = flush();