]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: rename/repurpose bluefs_check_volume_selector_on_umount setting.
authorIgor Fedotov <igor.fedotov@croit.io>
Wed, 11 Feb 2026 16:20:23 +0000 (19:20 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Thu, 19 Feb 2026 15:37:26 +0000 (18:37 +0300)
This is bluefs_check_volume_selector_on_mount now and enables volume
selector validation on both mount and umount.

Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit 777783f4219d7e456d701b01463ec3419bf20873)

src/common/options/global.yaml.in
src/os/bluestore/BlueFS.cc
src/test/objectstore/store_test.cc

index 898722f6d8af6a1d4464e85a7ee65e5694592dda..99cadcdf35e3bce430c3c3c23dc9e0a48c80e804 100644 (file)
@@ -4327,10 +4327,10 @@ options:
   flags:
   - runtime
   with_legacy: true
-- name: bluefs_check_volume_selector_on_umount
+- name: bluefs_check_volume_selector_on_mount
   type: bool
   level: dev
-  desc: Check validity of volume selector on umount
+  desc: Check validity of volume selector on mount/umount
   long_desc: Checks if volume selector did not diverge from the state it should be in.
     Reference is constructed from bluefs inode table. Asserts on inconsistency.
   default: false
@@ -4345,7 +4345,7 @@ options:
     Reference is constructed from bluefs inode table. Asserts on inconsistency. This is debug feature.
   default: false
   see_also:
-  - bluefs_check_volume_selector_on_umount
+  - bluefs_check_volume_selector_on_mount
   flags:
   - startup
   with_legacy: true
index 9811fff6bab38455e3b8b302ec64d5c09c6419ab..0ac7d1ac3615232fa30afffbe86287a7bd44e03a 100644 (file)
@@ -1080,6 +1080,9 @@ int BlueFS::mount()
     _stop_alloc();
     goto out;
   }
+  if (cct->_conf->bluefs_check_volume_selector_on_mount) {
+    _check_vselector_LNF();
+  }
 
   conf_wal_envelope_mode = cct->_conf.get_val<bool>("bluefs_wal_envelope_mode");
   log.uses_envelope_mode = conf_wal_envelope_mode;
@@ -1164,7 +1167,7 @@ void BlueFS::umount(bool avoid_compact)
   dout(1) << __func__ << dendl;
 
   sync_metadata(avoid_compact);
-  if (cct->_conf->bluefs_check_volume_selector_on_umount) {
+  if (cct->_conf->bluefs_check_volume_selector_on_mount) {
     _check_vselector_LNF();
   }
   _close_writer(log.writer);
index eb101fd803745c7b48747516ed185cadf614f168..5f7af3e4cbd397fc10434bcb389db59da1821f5b 100644 (file)
@@ -12161,7 +12161,7 @@ int main(int argc, char **argv) {
   g_ceph_context->_conf.set_val_or_die("bluestore_debug_randomize_serial_transaction",
                                 "10");
 
-  g_ceph_context->_conf.set_val_or_die("bluefs_check_volume_selector_on_umount", "true");
+  g_ceph_context->_conf.set_val_or_die("bluefs_check_volume_selector_on_mount", "true");
 
   g_ceph_context->_conf.set_val_or_die("bdev_debug_aio", "true");
   g_ceph_context->_conf.set_val_or_die("log_max_recent", "10000");