*
*/
+#include <limits>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
void *priv = static_cast<void*>(ioc);
int r, retries = 0;
+ // num of pending aios should not overflow when passed to submit_batch()
+ assert(pending <= std::numeric_limits<uint16_t>::max());
r = io_queue->submit_batch(ioc->running_aios.begin(), e,
pending, priv, &retries);
Option("bluestore_deferred_batch_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
.set_default(0)
+ .set_min_max(0, 65535)
.set_flag(Option::FLAG_RUNTIME)
.set_description("Max number of deferred writes before we flush the deferred write queue"),
Option("bluestore_deferred_batch_ops_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
.set_default(64)
+ .set_min_max(0, 65535)
.set_flag(Option::FLAG_RUNTIME)
.set_description("Default bluestore_deferred_batch_ops for rotational media")
.add_see_also("bluestore_deferred_batch_ops"),
Option("bluestore_deferred_batch_ops_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
.set_default(16)
+ .set_min_max(0, 65535)
.set_flag(Option::FLAG_RUNTIME)
.set_description("Default bluestore_deferred_batch_ops for non-rotational (solid state) media")
.add_see_also("bluestore_deferred_batch_ops"),