]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/options, os/bluestore: add debug option to force bluefs files onto slow device 68430/head
authorJaya Prakash <jayaprakash@ibm.com>
Thu, 7 May 2026 12:09:07 +0000 (12:09 +0000)
committerJaya Prakash <jayaprakash@ibm.com>
Mon, 1 Jun 2026 18:37:40 +0000 (18:37 +0000)
Fixes: https://tracker.ceph.com/issues/74319
Signed-off-by: Jaya Prakash <jayaprakash@ibm.com>
src/common/options/global.yaml.in
src/os/bluestore/BlueFS.cc

index bcadaa1cdce62cfbc7184cbe6db1c15a3d2f24a7..c67ee2996b175d2d59a7c927a0dab8d9b6946366 100644 (file)
@@ -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
index 04f7ebd4a52bf763af3c8aa7d24d27809696cb11..809c1a3ca843df23f844e95d2f781e3fc6c28aa3 100644 (file)
@@ -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<uint64_t>(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: