diff options
author | Samuel Just <sam.just@inktank.com> | 2013-06-19 19:54:31 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-06-19 19:54:31 -0700 |
commit | 84444d0be69d433f880ffe7f3a9b863043d1db5b (patch) | |
tree | 3d9a7b498b486391c359e09abc38d1b5dd5d7c83 | |
parent | ed8b0e65bde14d0a3a08bc233dee6a997e379dcc (diff) | |
parent | c39b99cdecceaca77f66eafbcc38387406826406 (diff) | |
download | ceph-84444d0be69d433f880ffe7f3a9b863043d1db5b.tar.gz |
Merge remote-tracking branch 'upstream/next'
-rw-r--r-- | src/os/FileStore.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 285b5c35e8a..9c7d6c77ea3 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -469,10 +469,16 @@ FileStore::FileStore(const std::string &base, const std::string &jdev, const cha plb.add_u64_counter(l_os_j_full, "journal_full"); logger = plb.create_perf_counters(); + + g_ceph_context->get_perfcounters_collection()->add(logger); + g_ceph_context->_conf->add_observer(this); } FileStore::~FileStore() { + g_ceph_context->_conf->remove_observer(this); + g_ceph_context->get_perfcounters_collection()->remove(logger); + if (journal) journal->logger = NULL; delete logger; @@ -1804,10 +1810,6 @@ int FileStore::mount() timer.init(); - g_ceph_context->get_perfcounters_collection()->add(logger); - - g_ceph_context->_conf->add_observer(this); - // all okay. return 0; @@ -1829,7 +1831,6 @@ int FileStore::umount() { dout(5) << "umount " << basedir << dendl; - g_ceph_context->_conf->remove_observer(this); start_sync(); @@ -1842,8 +1843,6 @@ int FileStore::umount() journal_stop(); - g_ceph_context->get_perfcounters_collection()->remove(logger); - op_finisher.stop(); ondisk_finisher.stop(); |