From 8a1fab37f2afb4c11f0f7bde98e4765ef6085a22 Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Sat, 9 Nov 2024 14:59:45 +0800 Subject: [PATCH] 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 --- src/crimson/osd/ops_executer.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 2.47.3