From db8d59ee4d615ddcc810da961352ccdb61026abb Mon Sep 17 00:00:00 2001 From: Sun Yuechi Date: Wed, 1 Jul 2026 16:37:35 +0800 Subject: [PATCH] osd: report -EINVAL to on_finish in asok_route_to_pg catch The handler passed the stale locate result (0) while returning -EINVAL, so callers saw success on a bad_cmd_get failure. Only reachable via the "scrubdebug" asok command (the sole user of asok_route_to_pg) when a parameter fails type parsing. Signed-off-by: Sun Yuechi --- src/osd/OSD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 6ee2ec0b8ac..e6e7489a675 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2760,7 +2760,7 @@ int OSD::asok_route_to_pg( } catch (const TOPNSPC::common::bad_cmd_get& e) { (*target_pg)->unlock(); ss << e.what(); - on_finish(ret, ss.str(), outbl); + on_finish(-EINVAL, ss.str(), outbl); return -EINVAL; } } -- 2.47.3