]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: report -EINVAL to on_finish in asok_route_to_pg catch 69865/head
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Wed, 1 Jul 2026 08:37:35 +0000 (16:37 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Wed, 1 Jul 2026 08:37:35 +0000 (16:37 +0800)
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 <sunyuechi@iscas.ac.cn>
src/osd/OSD.cc

index 6ee2ec0b8acb5d1e839667fe1d348ff3f64ea174..e6e7489a6753db68b156337f458f807be10ea4f7 100644 (file)
@@ -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;
   }
 }