Merge PR #26087 into master

* refs/pull/26087/head:
	mds: fix MDSGather inheritance
	include: remove unnecessary inheritance

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Patrick Donnelly 2019-01-26 16:50:16 -08:00
commit 585624d86b
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB
2 changed files with 4 additions and 16 deletions

View File

@ -261,7 +261,7 @@ typedef C_ContextsBase<Context, Context> C_Contexts;
* BUG:? only reports error from last sub to have an error return
*/
template <class ContextType, class ContextInstanceType>
class C_GatherBase : public ContextType {
class C_GatherBase {
private:
CephContext *cct;
int result;
@ -334,7 +334,7 @@ public:
{
mydout(cct,10) << "C_GatherBase " << this << ".new" << dendl;
}
~C_GatherBase() override {
~C_GatherBase() {
mydout(cct,10) << "C_GatherBase " << this << ".delete" << dendl;
}
void set_finisher(ContextType *onfinish_) {
@ -365,9 +365,6 @@ public:
mydout(cct,10) << "C_GatherBase " << this << ".new_sub is " << sub_created_count << " " << s << dendl;
return s;
}
void finish(int r) override {
ceph_abort(); // nobody should ever call me.
}
inline int get_sub_existing_count() const {
Mutex::Locker l(lock);

View File

@ -218,17 +218,8 @@ protected:
MDSRank *get_mds() override;
};
class MDSGather : public C_GatherBase<MDSInternalContextBase, MDSInternalContextGather>
{
public:
MDSGather(CephContext *cct, MDSInternalContextBase *onfinish) : C_GatherBase<MDSInternalContextBase, MDSInternalContextGather>(cct, onfinish) {}
protected:
MDSRank *get_mds() override {return NULL;}
};
typedef C_GatherBuilderBase<MDSInternalContextBase, MDSGather> MDSGatherBuilder;
using MDSGather = C_GatherBase<MDSInternalContextBase, MDSInternalContextGather>;
using MDSGatherBuilder = C_GatherBuilderBase<MDSInternalContextBase, MDSGather>;
using MDSContextFactory = ContextFactory<MDSInternalContextBase>;