]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Fix collect_alerts 68663/head
authorAdam Kupczyk <akupczyk@ibm.com>
Thu, 16 Apr 2026 09:38:44 +0000 (09:38 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Mon, 4 May 2026 16:27:10 +0000 (16:27 +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>
(cherry picked from commit 08510edf9f2ce3d184b123bf31c0b10e72f629fd)

src/os/bluestore/BlueFS.cc

index 97d9caeb844052014eb17aa8b1a60ef514afdd6c..ff5dea0e84a4cc2e582e25160f98e872ccfbf98b 100644 (file)
@@ -4750,10 +4750,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");
   }
 }