]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Fix collect_alerts 68416/head
authorAdam Kupczyk <akupczyk@ibm.com>
Thu, 16 Apr 2026 09:38:44 +0000 (09:38 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Wed, 22 Apr 2026 14:35:17 +0000 (14:35 +0000)
In some cases bdev->collect_alerts() was called twice on the same device.
It happened when DB and SLOW are the same device.
Now only called once.

It made no difference when we just set alert string,
but with EXTBLKDEV we append warning message.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
src/os/bluestore/BlueFS.cc

index 19032f5ecbcee59a868e7c6126f3f623b58cd2e1..875269f04a4f743dd3d3b152028980526dc9a359 100644 (file)
@@ -4798,10 +4798,11 @@ bool BlueFS::debug_get_is_dev_dirty(FileWriter *h, uint8_t dev)
 }
 
 void BlueFS::collect_alerts(osd_alert_list_t& alerts) {
-  if (bdev[BDEV_DB]) {
+  if (bdev[BDEV_DB] &&
+    (!is_shared_alloc(BDEV_DB) /*BlueStore is collecting alerts for its bdev*/) ) {
     bdev[BDEV_DB]->collect_alerts(alerts, "DB");
   }
-  if (bdev[BDEV_WAL]) {
+  if (bdev[BDEV_WAL] /*WAL is never shared*/) {
     bdev[BDEV_WAL]->collect_alerts(alerts, "WAL");
   }
   _update_logger_stats(); // just to have it updated more frequently