Skip to content

Commit df404e0

Browse files
committed
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 <[email protected]> Fixes: http://tracker.ceph.com/issues/56442
1 parent 4697f4e commit df404e0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/mds/MDSContext.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
#define dout_context g_ceph_context
2222
#define dout_subsys ceph_subsys_mds
2323

24-
void MDSContext::complete(int r) {
24+
void MDSContext::finish(int r) {
2525
MDSRank *mds = get_mds();
2626
ceph_assert(mds != nullptr);
2727
ceph_assert(ceph_mutex_is_locked_by_me(mds->mds_lock));
28-
dout(10) << "MDSContext::complete: " << typeid(*this).name() << dendl;
28+
dout(10) << "MDSContext::finish: " << typeid(*this).name() << dendl;
2929
mds->heartbeat_reset();
30-
return Context::complete(r);
3130
}
3231

3332
void MDSInternalContextWrapper::finish(int r)

src/mds/MDSContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ template<template<typename> class A>
4444
using que_alloc = std::deque<MDSContext*, A<MDSContext*>>;
4545
using que = que_alloc<std::allocator>;
4646

47-
void complete(int r) override;
47+
void finish(int r) override;
4848
virtual MDSRank *get_mds() = 0;
4949
};
5050

0 commit comments

Comments
 (0)