]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
bluefs: bluefs alloc unit should only be shrink
authorliangmingyuan <liangmingyuan@baidu.com>
Sun, 21 Apr 2024 12:32:09 +0000 (20:32 +0800)
committerliangmingyuan <liangmingyuan@baidu.com>
Fri, 24 May 2024 06:39:53 +0000 (14:39 +0800)
commiteed03125c4a7c5ee558ae72e73060475c406dc5f
tree65bda9fce8df7176e5092c080293dd22f1a2af06
parentf25efe276f8d578843356b6df44df179694945a6
bluefs: bluefs alloc unit should only be shrink

The alloc unit has already forbidden changed for bluestore, what's more,
it should forbidden increased in bluefs. Otherwise, it can leads to
coredump or bad data. Let's explain it use Bitmap Allocater, it has two
presentations:
a) in BitmapAllocator::init_rm_free(offset, length),
(offset + length) should bigger than offs. But when get_min_alloc_size()
changed bigger, this can not be guaranteed.
b) if init_rm_free() are
successfully in luck, then in rocksdb compact, when release() be called,
it release a small extent but may leads to larger extents be released to
Bitmap. As a result, rocksdb data is corrupted, and the osd can not be
booted again.

Signed-off-by: Mingyuan Liang <liangmingyuan@baidu.com>
src/os/bluestore/BlueFS.cc
src/os/bluestore/bluefs_types.cc
src/os/bluestore/bluefs_types.h