OPTION(rbd_journal_object_flush_age, OPT_DOUBLE, 0) // maximum age (in seconds) for pending commits
OPTION(rbd_journal_pool, OPT_STR, "") // pool for journal objects
OPTION(rbd_journal_max_payload_bytes, OPT_U32, 16384) // maximum journal payload size before splitting
+OPTION(rbd_journal_max_concurrent_object_sets, OPT_INT, 0) // maximum number of object sets a journal client can be behind before it is automatically unregistered
/**
* RBD Mirror options
"rbd_journal_object_flush_bytes", false)(
"rbd_journal_object_flush_age", false)(
"rbd_journal_pool", false)(
- "rbd_journal_max_payload_bytes", false);
+ "rbd_journal_max_payload_bytes", false)(
+ "rbd_journal_max_concurrent_object_sets", false);
md_config_t local_config_t;
std::map<std::string, bufferlist> res;
ASSIGN_OPTION(journal_object_flush_age);
ASSIGN_OPTION(journal_pool);
ASSIGN_OPTION(journal_max_payload_bytes);
+ ASSIGN_OPTION(journal_max_concurrent_object_sets);
}
ExclusiveLock<ImageCtx> *ImageCtx::create_exclusive_lock() {
double journal_object_flush_age;
std::string journal_pool;
uint32_t journal_max_payload_bytes;
+ int journal_max_concurrent_object_sets;
LibrbdAdminSocketHook *asok_hook;
::journal::Settings settings;
settings.commit_interval = m_image_ctx.journal_commit_age;
settings.max_payload_bytes = m_image_ctx.journal_max_payload_bytes;
+ settings.max_concurrent_object_sets =
+ m_image_ctx.journal_max_concurrent_object_sets;
+ // TODO: a configurable filter to exclude certain peers from being
+ // disconnected.
+ settings.whitelisted_laggy_clients = {IMAGE_CLIENT_ID};
m_journaler = new Journaler(m_work_queue, m_timer, m_timer_lock,
m_image_ctx.md_ctx, m_image_ctx.id,
journal_object_flush_bytes(image_ctx.journal_object_flush_bytes),
journal_object_flush_age(image_ctx.journal_object_flush_age),
journal_pool(image_ctx.journal_pool),
- journal_max_payload_bytes(image_ctx.journal_max_payload_bytes)
+ journal_max_payload_bytes(image_ctx.journal_max_payload_bytes),
+ journal_max_concurrent_object_sets(
+ image_ctx.journal_max_concurrent_object_sets)
{
md_ctx.dup(image_ctx.md_ctx);
data_ctx.dup(image_ctx.data_ctx);
double journal_object_flush_age;
std::string journal_pool;
uint32_t journal_max_payload_bytes;
+ int journal_max_concurrent_object_sets;
};
} // namespace librbd