From: Jaya Prakash Date: Thu, 7 May 2026 12:09:07 +0000 (+0000) Subject: common/options, os/bluestore: add debug option to force bluefs files onto slow device X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68430%2Fhead;p=ceph.git common/options, os/bluestore: add debug option to force bluefs files onto slow device Fixes: https://tracker.ceph.com/issues/74319 Signed-off-by: Jaya Prakash --- diff --git a/src/common/options/global.yaml.in b/src/common/options/global.yaml.in index bcadaa1cdce..c67ee2996b1 100644 --- a/src/common/options/global.yaml.in +++ b/src/common/options/global.yaml.in @@ -4414,6 +4414,16 @@ options: flags: - runtime with_legacy: true +- name: bluefs_debug_force_slow + type: bool + level: dev + desc: For testing. Force BlueFS to allocate files on slow device. + long_desc: When enabled, the RocksDBBlueFSVolumeSelector will ignore normal + placement policy and redirect allocations to slow device. + default: false + flags: + - runtime + with_legacy: true - name: bluestore_bluefs type: bool level: dev diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 04f7ebd4a52..809c1a3ca84 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -5745,6 +5745,11 @@ uint64_t RocksDBBlueFSVolumeSelector::get_effective_extra() const { uint8_t RocksDBBlueFSVolumeSelector::select_prefer_bdev(void* h) { ceph_assert(h != nullptr); uint64_t hint = reinterpret_cast(h); + if (g_ceph_context->_conf->bluefs_debug_force_slow) { + if (hint != LEVEL_LOG) { + return BlueFS::BDEV_SLOW; + } + } uint8_t res; switch (hint) { case LEVEL_SLOW: