6bc52686bb31cc80902ad82e0bcbd9eb1c5aff0d
[stor4nfv.git] / src / ceph / 0005-librbd-fix-conf-get_val.patch
1 From be47f5e7980d92379b9feaef2e2f1e1579df94ba Mon Sep 17 00:00:00 2001
2 From: Yuan Zhou <yuan.zhou@intel.com>
3 Date: Mon, 6 Aug 2018 22:05:13 +0800
4 Subject: [PATCH 05/10] librbd: fix conf get_val
5
6 Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
7 ---
8  src/librbd/cache/SharedPersistentObjectCacherFile.cc | 2 +-
9  src/tools/rbd_cache/CacheController.cc               | 2 +-
10  src/tools/rbd_cache/main.cc                          | 4 ++--
11  3 files changed, 4 insertions(+), 4 deletions(-)
12
13 diff --git a/src/librbd/cache/SharedPersistentObjectCacherFile.cc b/src/librbd/cache/SharedPersistentObjectCacherFile.cc
14 index 75a3053..6f9c3e0 100644
15 --- a/src/librbd/cache/SharedPersistentObjectCacherFile.cc
16 +++ b/src/librbd/cache/SharedPersistentObjectCacherFile.cc
17 @@ -23,7 +23,7 @@ namespace cache {
18  
19  SyncFile::SyncFile(CephContext *cct, const std::string &name)
20    : cct(cct) {
21 -  m_name = cct->_conf->get_val<std::string>("rbd_shared_cache_path") + "/rbd_cache." + name;
22 +  m_name = cct->_conf.get_val<std::string>("rbd_shared_cache_path") + "/rbd_cache." + name;
23    ldout(cct, 20) << "file path=" << m_name << dendl;
24  }
25  
26 diff --git a/src/tools/rbd_cache/CacheController.cc b/src/tools/rbd_cache/CacheController.cc
27 index e73ba25..cefcf28 100644
28 --- a/src/tools/rbd_cache/CacheController.cc
29 +++ b/src/tools/rbd_cache/CacheController.cc
30 @@ -20,7 +20,7 @@ public:
31      : ThreadPool(cct, "librbd::cache::thread_pool", "tp_librbd_cache", 32,
32                   "pcache_threads"),
33        op_work_queue(new ContextWQ("librbd::pcache_op_work_queue",
34 -                    cct->_conf->get_val<int64_t>("rbd_op_thread_timeout"),
35 +                    cct->_conf.get_val<int64_t>("rbd_op_thread_timeout"),
36                      this)) {
37      start();
38    }
39 diff --git a/src/tools/rbd_cache/main.cc b/src/tools/rbd_cache/main.cc
40 index a7c5b64..d604760 100644
41 --- a/src/tools/rbd_cache/main.cc
42 +++ b/src/tools/rbd_cache/main.cc
43 @@ -46,7 +46,7 @@ int main(int argc, const char **argv)
44      }
45    }
46  
47 -  if (g_conf->daemonize) {
48 +  if (g_conf()->daemonize) {
49      global_init_daemonize(g_ceph_context);
50    }
51    g_ceph_context->enable_perf_counter();
52 @@ -62,7 +62,7 @@ int main(int argc, const char **argv)
53    argv_to_vec(argc, argv, cmd_args);
54  
55    // disable unnecessary librbd cache
56 -  g_ceph_context->_conf->set_val_or_die("rbd_cache", "false");
57 +  g_ceph_context->_conf.set_val_or_die("rbd_cache", "false");
58  
59    cachectl = new rbd::cache::CacheController(g_ceph_context, cmd_args);
60    int r = cachectl->init();
61 -- 
62 2.7.4
63