]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore: avoid using global `g_ceph_context` 33458/head
authorKefu Chai <kchai@redhat.com>
Fri, 21 Feb 2020 13:04:29 +0000 (21:04 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 22 Feb 2020 03:29:34 +0000 (11:29 +0800)
always prefer using the local one, for better readability and
testability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/os/filestore/FileJournal.h
src/os/filestore/JournalThrottle.h

index d2475e437f88a1107e89eb281b91edb58d7dc486..b0204366265af14f6c11c167bfd73d6334fd3f0f 100644 (file)
@@ -417,7 +417,7 @@ private:
     full_state(FULL_NOTFULL),
     fd(-1),
     writing_seq(0),
-    throttle(cct->_conf->filestore_caller_concurrency),
+    throttle(cct, cct->_conf->filestore_caller_concurrency),
     write_stop(true),
     aio_stop(true),
     write_thread(this),
index 75485d6d8f30461fc51ca5950dcc9b01e853f784..f32f5d734f54d0af10b1bb6090f8495b8e953f4e 100644 (file)
@@ -94,8 +94,9 @@ public:
   uint64_t get_max();
 
   JournalThrottle(
+    CephContext *cct,
     unsigned expected_concurrency ///< [in] determines size of conds
-    ) : throttle(g_ceph_context, "filestore_journal", expected_concurrency) {}
+    ) : throttle(cct, "filestore_journal", expected_concurrency) {}
 };
 
 #endif