From: Xuehan Xu Date: Sat, 9 Nov 2024 06:59:45 +0000 (+0800) Subject: crimson/osd/ops_executor: call OpsExecutor::apply_stats() before X-Git-Tag: v20.0.0~652^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F60596%2Fhead;p=ceph.git crimson/osd/ops_executor: call OpsExecutor::apply_stats() before OpsExecutor::obc is moved out. OpsExecutor::apply_stats() accesses OpsExecutor::obc indirectly Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/osd/ops_executer.h b/src/crimson/osd/ops_executer.h index e770e825b32d..3c8b961d4b9a 100644 --- a/src/crimson/osd/ops_executer.h +++ b/src/crimson/osd/ops_executer.h @@ -504,6 +504,7 @@ OpsExecuter::flush_changes_n_do_ops_effects( ceph_assert(want_mutate); } + apply_stats(); if (want_mutate) { auto log_entries = flush_clone_metadata( prepare_transaction(ops), @@ -525,8 +526,6 @@ OpsExecuter::flush_changes_n_do_ops_effects( all_completed = std::move(_all_completed); } - apply_stats(); - if (op_effects.size()) [[unlikely]] { // need extra ref pg due to apply_stats() which can be executed after // informing snap mapper