From: Kefu Chai Date: Fri, 21 Feb 2020 13:03:33 +0000 (+0800) Subject: os/bluestore: avoid using global `g_ceph_context` X-Git-Tag: v16.0.0~60^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=33b69312b28ff65e3fee447f70cdb8cf4882997d;p=ceph.git os/bluestore: avoid using global `g_ceph_context` always prefer using the local one, for better readability and testability. Signed-off-by: Kefu Chai --- diff --git a/src/os/bluestore/KernelDevice.cc b/src/os/bluestore/KernelDevice.cc index 990e0ce90999..f816cd66b521 100644 --- a/src/os/bluestore/KernelDevice.cc +++ b/src/os/bluestore/KernelDevice.cc @@ -55,7 +55,7 @@ KernelDevice::KernelDevice(CephContext* cct, aio_callback_t cb, void *cbpriv, ai fd_directs.resize(WRITE_LIFE_MAX, -1); fd_buffereds.resize(WRITE_LIFE_MAX, -1); - bool use_ioring = g_ceph_context->_conf.get_val("bluestore_ioring"); + bool use_ioring = cct->_conf.get_val("bluestore_ioring"); unsigned int iodepth = cct->_conf->bdev_aio_max_queue_depth; if (use_ioring && ioring_queue_t::supported()) {