]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Mon, 3 Mar 2025 13:19:56 +0000 (13:19 +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
src/mds/MDSContext.cc
src/mds/MDSContext.h

index 56d86280e406c4ff2f27e7c7884241c524c29fdf..2f947cb4521af2a642c8edef91c8a7b4121a4201 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;
 };