In BlueFS::_estimate_log_size_N, the total size of
the dir was calculated incorrectly.
Fixes: https://tracker.ceph.com/issues/65176
co-author: Jrchyang Yu <yuzhiqiang_yewu@cmss.chinamobile.com>
Signed-off-by: Wang Linke <wanglinke_yewu@cmss.chinamobile.com>
(cherry picked from commit
61058bf102f9ed7dbe2e601f5a1243be5149df06)
int avg_file_size = 12;
uint64_t size = 4096 * 2;
size += nodes.file_map.size() * (1 + sizeof(bluefs_fnode_t));
- size += nodes.dir_map.size() + (1 + avg_dir_size);
+ size += nodes.dir_map.size() * (1 + avg_dir_size);
size += nodes.file_map.size() * (1 + avg_dir_size + avg_file_size);
return round_up_to(size, super.block_size);
}