]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix the problem that estimate the log size incorrectly 56515/head
authorwanglinke <wanglinke@cmss.chinamobile.com>
Wed, 27 Mar 2024 09:51:04 +0000 (17:51 +0800)
committerwanglinke <wanglinke@cmss.chinamobile.com>
Thu, 28 Mar 2024 02:15:17 +0000 (10:15 +0800)
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>
src/os/bluestore/BlueFS.cc

index a8b1fb25ee85ee09528b080231e1813658949cf6..9f419c195851ac2963d5ff306dbf4412ea512f6f 100644 (file)
@@ -2429,7 +2429,7 @@ uint64_t BlueFS::_estimate_log_size_N()
   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);
 }