From: Kefu Chai Date: Mon, 13 Jul 2020 03:19:53 +0000 (+0800) Subject: blk/zoned: do not use g_ceph_context for reading conf X-Git-Tag: v17.0.0~1767^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=206a11b4d5a462acfa76e08803d119ff31dc1c3f;p=ceph.git blk/zoned: do not use g_ceph_context for reading conf use local `cct` instead, more consistent this way Signed-off-by: Kefu Chai --- diff --git a/src/blk/zoned/HMSMRDevice.cc b/src/blk/zoned/HMSMRDevice.cc index fcf36c833c543..3ae72c35f836b 100644 --- a/src/blk/zoned/HMSMRDevice.cc +++ b/src/blk/zoned/HMSMRDevice.cc @@ -34,7 +34,6 @@ #include "common/debug.h" #include "common/numa.h" -#include "global/global_context.h" #include "kernel/io_uring.h" extern "C" { @@ -61,7 +60,7 @@ HMSMRDevice::HMSMRDevice(CephContext* cct, aio_callback_t cb, void *cbpriv, aio_ 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()) {