From: Sun Yuechi Date: Wed, 1 Jul 2026 08:37:35 +0000 (+0800) Subject: osd: report -EINVAL to on_finish in asok_route_to_pg catch X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=db8d59ee4d615ddcc810da961352ccdb61026abb;p=ceph.git 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 --- 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; } }