Skip to content

Commit 61058bf

Browse files
author
wanglinke
committed
os/bluestore: fix the problem that estimate the log size incorrectly
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 <[email protected]> Signed-off-by: Wang Linke <[email protected]>
1 parent eae914f commit 61058bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/os/bluestore/BlueFS.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2429,7 +2429,7 @@ uint64_t BlueFS::_estimate_log_size_N()
24292429
int avg_file_size = 12;
24302430
uint64_t size = 4096 * 2;
24312431
size += nodes.file_map.size() * (1 + sizeof(bluefs_fnode_t));
2432-
size += nodes.dir_map.size() + (1 + avg_dir_size);
2432+
size += nodes.dir_map.size() * (1 + avg_dir_size);
24332433
size += nodes.file_map.size() * (1 + avg_dir_size + avg_file_size);
24342434
return round_up_to(size, super.block_size);
24352435
}

0 commit comments

Comments
 (0)