From: Sage Weil Date: Mon, 21 Dec 2015 21:45:02 +0000 (-0500) Subject: os/bluestore/BlockDevice: rename bdev options X-Git-Tag: v10.0.3~154^2~103 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a3de5b680d830d518b3ffec25cc942b517bf2d44;p=ceph.git os/bluestore/BlockDevice: rename bdev options Signed-off-by: Sage Weil --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 652c31bdd818..abc4d99e7eef 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -835,6 +835,9 @@ OPTION(memstore_page_size, OPT_U64, 64 << 10) OPTION(bdev_debug_inflight_ios, OPT_BOOL, false) OPTION(bdev_inject_crash, OPT_INT, 0) // if N>0, then ~ 1/N IOs will complete before we crash on flush. +OPTION(bdev_aio, OPT_BOOL, true) +OPTION(bdev_aio_poll_ms, OPT_INT, 250) // milliseconds +OPTION(bdev_aio_max_queue_depth, OPT_INT, 4096) OPTION(bluefs_alloc_size, OPT_U64, 1048576) OPTION(bluefs_max_prefetch, OPT_U64, 1048576) @@ -882,9 +885,6 @@ OPTION(bluestore_overlay_max_length, OPT_INT, 65536) OPTION(bluestore_overlay_max, OPT_INT, 0) OPTION(bluestore_open_by_handle, OPT_BOOL, true) OPTION(bluestore_o_direct, OPT_BOOL, true) -OPTION(bluestore_aio, OPT_BOOL, true) -OPTION(bluestore_aio_poll_ms, OPT_INT, 250) // milliseconds -OPTION(bluestore_aio_max_queue_depth, OPT_INT, 4096) OPTION(kstore_max_ops, OPT_U64, 512) OPTION(kstore_max_bytes, OPT_U64, 64*1024*1024) diff --git a/src/os/bluestore/BlockDevice.cc b/src/os/bluestore/BlockDevice.cc index 618b6cfef25a..9b45d1b73716 100644 --- a/src/os/bluestore/BlockDevice.cc +++ b/src/os/bluestore/BlockDevice.cc @@ -44,7 +44,7 @@ BlockDevice::BlockDevice(aio_callback_t cb, void *cbpriv) size(0), block_size(0), fs(NULL), aio(false), dio(false), debug_lock("BlockDevice::debug_lock"), - aio_queue(g_conf->bluestore_aio_max_queue_depth), + aio_queue(g_conf->bdev_aio_max_queue_depth), aio_callback(cb), aio_callback_priv(cbpriv), aio_stop(false), @@ -80,7 +80,10 @@ int BlockDevice::open(string path) } dio = true; #ifdef HAVE_LIBAIO - aio = g_conf->bluestore_aio; + aio = g_conf->bdev_aio; + if (!aio) { + assert(0 == "non-aio not supported"); + } #endif int r = _lock(); @@ -163,7 +166,7 @@ int BlockDevice::flush() int BlockDevice::_aio_start() { - if (g_conf->bluestore_aio) { + if (g_conf->bdev_aio) { dout(10) << __func__ << dendl; int r = aio_queue.init(); if (r < 0) @@ -175,7 +178,7 @@ int BlockDevice::_aio_start() void BlockDevice::_aio_stop() { - if (g_conf->bluestore_aio) { + if (g_conf->bdev_aio) { dout(10) << __func__ << dendl; aio_stop = true; aio_thread.join(); @@ -191,7 +194,7 @@ void BlockDevice::_aio_thread() dout(40) << __func__ << " polling" << dendl; int max = 16; FS::aio_t *aio[max]; - int r = aio_queue.get_next_completed(g_conf->bluestore_aio_poll_ms, + int r = aio_queue.get_next_completed(g_conf->bdev_aio_poll_ms, aio, max); if (r < 0) { derr << __func__ << " got " << cpp_strerror(r) << dendl;