]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: move MDSContext completion handling to finish method
authorIgor Golikov <igolikov@ibm.com>
Sun, 16 Feb 2025 08:42:44 +0000 (08:42 +0000)
committerIgor Golikov <igolikov@ibm.com>
Sun, 11 May 2025 10:00:20 +0000 (10:00 +0000)
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 <igolikov@ibm.com>
Fixes: http://tracker.ceph.com/issues/56442
(cherry picked from commit df404e03915765ef5c854a48556fd716161f3add)

src/mds/MDSContext.cc
src/mds/MDSContext.h

index 6bceb835cfdec2ff034030e7fb433ff587417c67..8a85e28fccfdf249216f597459c67fba3d47d331 100644 (file)
 #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)
index 66faef1cbebd0ab3ae092fddf8ae2fb830274a94..1f8e9350f5695e0421ed17f9341f51eb569cf60c 100644 (file)
@@ -44,7 +44,7 @@ template<template<typename> class A>
   using que_alloc = std::deque<MDSContext*, A<MDSContext*>>;
   using que = que_alloc<std::allocator>;
 
-  void complete(int r) override;
+  void finish(int r) override;
   virtual MDSRank *get_mds() = 0;
 };