]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix crash caused by dividing by 0 57198/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:50 +0000 (17:32 +0700)
commit6159e62b5502360c9ca5370731e7a78ef0b661e0
tree2a6009b4b7b2f949ca7c01499a1f0283a0cccf9f
parentd69ee407b56322a8289acc4c5fe3d52e531708d5
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