mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
Merge PR #37037 into master
* refs/pull/37037/head: mds: fix purge_queue's _calculate_ops is inaccurate Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
commit
b64c3784f0
@ -371,14 +371,12 @@ uint32_t PurgeQueue::_calculate_ops(const PurgeItem &item) const
|
||||
ops_required = 1 + leaves.size();
|
||||
} else {
|
||||
// File, work out concurrent Filer::purge deletes
|
||||
// Account for removing (or zeroing) backtrace
|
||||
const uint64_t num = (item.size > 0) ?
|
||||
Striper::get_num_objects(item.layout, item.size) : 1;
|
||||
|
||||
ops_required = std::min(num, g_conf()->filer_max_purge_ops);
|
||||
|
||||
// Account for removing (or zeroing) backtrace
|
||||
ops_required += 1;
|
||||
|
||||
// Account for deletions for old pools
|
||||
if (item.action != PurgeItem::TRUNCATE_FILE) {
|
||||
ops_required += item.old_pools.size();
|
||||
|
Loading…
Reference in New Issue
Block a user