From 31b9c683ee685326b9468d866daca6b29739c78b Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sun, 23 Jan 2022 00:45:09 +0300 Subject: [PATCH] Fix flushing of unclean objects This was preventing OSD failover when there were some unclean objects. Bug was introduced in aa436027c8aa1a788a37f12e118fe46865cb70f0 --- src/osd_peering.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd_peering.cpp b/src/osd_peering.cpp index e50ca121..ef8ee53b 100644 --- a/src/osd_peering.cpp +++ b/src/osd_peering.cpp @@ -27,9 +27,9 @@ void osd_t::handle_peers() misplaced_objects += p.second.misplaced_objects.size(); // FIXME: degraded objects may currently include misplaced, too! Report them separately? degraded_objects += p.second.degraded_objects.size(); - if ((p.second.state & (PG_ACTIVE | PG_HAS_UNCLEAN)) == (PG_ACTIVE | PG_HAS_UNCLEAN)) + if (p.second.state & PG_HAS_UNCLEAN) peering_state = peering_state | OSD_FLUSHING_PGS; - else if (p.second.state & PG_ACTIVE) + else if (p.second.state & PG_HAS_DEGRADED) peering_state = peering_state | OSD_RECOVERING; } else