From 08510edf9f2ce3d184b123bf31c0b10e72f629fd Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Thu, 16 Apr 2026 09:38:44 +0000 Subject: [PATCH] os/bluestore: Fix collect_alerts 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 --- src/os/bluestore/BlueFS.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 19032f5ecbce..875269f04a4f 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -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 -- 2.47.3