]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix crash caused by dividing by 0 57197/head
authorjrchyang <yujrchyang@outlook.com>
Tue, 24 Oct 2023 02:03:09 +0000 (10:03 +0800)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Wed, 1 May 2024 10:32:20 +0000 (17:32 +0700)
commit74ff24973621f4dc99cb0fc24b27fc042ae90c62
tree36c3a6461163550737552325315cf94d8897f822
parent58249552a22f437b8cb49ed6b1068e1158bed605
os/bluestore: fix crash caused by dividing by 0

In Allocator::create() => ZonedAllocator::ZonedAllocator()
num_zones is calculated by size / zone_size,
causing a crash when zone_size is set to 0

Signed-off-by: Jrchyang Yu <yuzhiqiang_yewu@cmss.chinamobile.com>
(cherry picked from commit 4364ebdfa4a218a61528f7579e45233cc4725326)
src/os/bluestore/BlueStore.cc