]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix assertion in StupidAllocator::get_fragmentation 32523/head
authorIgor Fedotov <ifedotov@suse.com>
Thu, 16 Aug 2018 11:51:06 +0000 (14:51 +0300)
committerLei Liu <liulei3@360.cn>
Thu, 9 Jan 2020 14:44:01 +0000 (22:44 +0800)
commit1854150fccc486f0bff5d384f8ccb0c161fb4d05
tree8e90b75852c276fb4562887149e9fc7f0e62814a
parentce90234e66122669f4aa22d7c5b1418c79ceb5dd
os/bluestore: fix assertion in StupidAllocator::get_fragmentation

One might face an assertion (assert(intervals <= max_intervals))
in StupidAllocator::get_fragmentation method for clusters created
by early Luminous releases and before. The root cause is that block
volume size wasn't aligned with min_alloc_size and hence we missed
that last fraction interval during max_interval calculation.

Fixes: https://tracker.ceph.com/issues/43297
Note: This was a clean cherry-pick from master, but p2roundup was
introduced since mimic release, use P2ROUNDUP instead

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit a60b2316ce0bed28c468043cff4cab5e61b1a694)
Signed-off-by: Lei Liu <liulei3@360.cn>
src/os/bluestore/StupidAllocator.cc