From: Patrick Donnelly Date: Sun, 22 Jul 2018 01:15:20 +0000 (-0700) Subject: mds: add vector def for MDS contexts X-Git-Tag: v14.0.1~708^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=db0e8cf3d7b85331f3a2a35700e19e25eefdf565;p=ceph.git mds: add vector def for MDS contexts This will be used as a more allocator-efficient container for lists of contexts. We don't actually need fast insertion/deletion at any place in the list. We also don't need to insert at the beginning. Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/MDSContext.h b/src/mds/MDSContext.h index 4e6372110aa..29952f9b3dd 100644 --- a/src/mds/MDSContext.h +++ b/src/mds/MDSContext.h @@ -16,6 +16,9 @@ #ifndef MDS_CONTEXT_H #define MDS_CONTEXT_H +#include +#include + #include "include/Context.h" #include "include/elist.h" #include "common/ceph_time.h" @@ -44,6 +47,14 @@ protected: class MDSInternalContextBase : public MDSContext { public: + template class A> + using vec_alloc = std::vector>; + using vec = vec_alloc; + + template class A> + using que_alloc = std::queue>>; + using que = que_alloc; + void complete(int r) override; };