diff options
author | Josh Durgin <josh.durgin@dreamhost.com> | 2012-01-20 15:58:37 -0800 |
---|---|---|
committer | Josh Durgin <josh.durgin@dreamhost.com> | 2012-01-27 17:07:45 -0800 |
commit | dbda1b6b24cc0e33562e7e1f34c9e15219ced586 (patch) | |
tree | 982be5a0e71450cccaca52769a7ed5a200816a14 | |
parent | d0a447d84e7f5b56d439c3b8f6714b8b1d6fd5da (diff) | |
download | ceph-dbda1b6b24cc0e33562e7e1f34c9e15219ced586.tar.gz |
CephContext: add method for retrieving admin socket
This is needed to allow higher layers in the stack to add admin socket
commands.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
-rw-r--r-- | src/common/ceph_context.cc | 5 | ||||
-rw-r--r-- | src/common/ceph_context.h | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index 285d9852bdc..3519e1c76ac 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -231,4 +231,7 @@ PerfCountersCollection *CephContext::get_perfcounters_collection() return _perf_counters_collection; } - +AdminSocket *CephContext::get_admin_socket() +{ + return _admin_socket; +} diff --git a/src/common/ceph_context.h b/src/common/ceph_context.h index 8a8ad71925d..f14a9f452fa 100644 --- a/src/common/ceph_context.h +++ b/src/common/ceph_context.h @@ -71,6 +71,16 @@ public: return _heartbeat_map; } + /** + * Get the admin socket associated with this CephContext. + * + * Currently there is always an admin socket object, + * so this will never return NULL. + * + * @return the admin socket + */ + AdminSocket *get_admin_socket(); + private: CephContext(const CephContext &rhs); CephContext &operator=(const CephContext &rhs); @@ -85,7 +95,7 @@ private: friend class CephContextServiceThread; CephContextServiceThread *_service_thread; - /* The collection of profiling loggers associated with this context */ + /* The admin socket associated with this context */ AdminSocket *_admin_socket; /* lock which protects service thread creation, destruction, etc. */ |