diff options
author | Adam C. Emerson <aemerson@redhat.com> | 2020-04-28 23:32:56 +0200 |
---|---|---|
committer | Adam C. Emerson <aemerson@redhat.com> | 2020-05-15 16:55:10 +0200 |
commit | 306eebe05bec1220b2477a66b6501da222bacdfc (patch) | |
tree | fd4367676024664968b116299b3f06fb5bbe9204 /src/libcephfs.cc | |
parent | buffer: base exceptions on system_error (diff) | |
download | ceph-306eebe05bec1220b2477a66b6501da222bacdfc.tar.xz ceph-306eebe05bec1220b2477a66b6501da222bacdfc.zip |
monc: Asifoact MonClient
Of course now everyone has to feed an io_context into the MonClient.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Diffstat (limited to 'src/libcephfs.cc')
-rw-r--r-- | src/libcephfs.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libcephfs.cc b/src/libcephfs.cc index ebc8e932825..623b6bb51ab 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -20,6 +20,7 @@ #include "auth/Crypto.h" #include "client/Client.h" #include "librados/RadosClient.h" +#include "common/async/context_pool.h" #include "common/ceph_argparse.h" #include "common/common_init.h" #include "common/config.h" @@ -36,6 +37,7 @@ #define DEFAULT_UMASK 002 static mode_t umask_cb(void *); +ceph::async::io_context_pool icp; struct ceph_mount_info { @@ -83,8 +85,9 @@ public: cct->_log->start(); } + icp.start(cct->_conf.get_val<std::uint64_t>("client_asio_thread_count")); { - MonClient mc_bootstrap(cct); + MonClient mc_bootstrap(cct, icp); ret = mc_bootstrap.get_monmap_and_config(); if (ret < 0) return ret; @@ -93,7 +96,7 @@ public: common_init_finish(cct); //monmap - monclient = new MonClient(cct); + monclient = new MonClient(cct, icp); ret = -CEPHFS_ERROR_MON_MAP_BUILD; //defined in libcephfs.h; if (monclient->build_initial_monmap() < 0) goto fail; @@ -202,6 +205,7 @@ public: delete messenger; messenger = nullptr; } + icp.stop(); if (monclient) { delete monclient; monclient = nullptr; |