From: Igor Golikov Date: Sun, 16 Feb 2025 08:42:44 +0000 (+0000) Subject: mds: move MDSContext completion handling to finish method X-Git-Tag: testing/wip-jcollin-testing-20250905.013620-squid~2^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a589e142a1116754e29ca1d732e30670701fbdfe;p=ceph-ci.git mds: move MDSContext completion handling to finish method the rename makes the code consistent and allows to call the `MDSContext::finish` method from the `C_MDS_DumpStrayDirCtx::finish` method, which fortifies the safety of the new dump stray folder command. Signed-off-by: Igor Golikov Fixes: http://tracker.ceph.com/issues/56442 (cherry picked from commit df404e03915765ef5c854a48556fd716161f3add) --- diff --git a/src/mds/MDSContext.cc b/src/mds/MDSContext.cc index 6bceb835cfd..8a85e28fccf 100644 --- a/src/mds/MDSContext.cc +++ b/src/mds/MDSContext.cc @@ -21,13 +21,12 @@ #define dout_context g_ceph_context #define dout_subsys ceph_subsys_mds -void MDSContext::complete(int r) { +void MDSContext::finish(int r) { MDSRank *mds = get_mds(); ceph_assert(mds != nullptr); ceph_assert(ceph_mutex_is_locked_by_me(mds->mds_lock)); - dout(10) << "MDSContext::complete: " << typeid(*this).name() << dendl; + dout(10) << "MDSContext::finish: " << typeid(*this).name() << dendl; mds->heartbeat_reset(); - return Context::complete(r); } void MDSInternalContextWrapper::finish(int r) diff --git a/src/mds/MDSContext.h b/src/mds/MDSContext.h index 66faef1cbeb..1f8e9350f56 100644 --- a/src/mds/MDSContext.h +++ b/src/mds/MDSContext.h @@ -44,7 +44,7 @@ template class A> using que_alloc = std::deque>; using que = que_alloc; - void complete(int r) override; + void finish(int r) override; virtual MDSRank *get_mds() = 0; };