Signed-off-by: Mark Nelson <mnelson@redhat.com>
.set_default(true)
.set_description(""),
+ Option("osd_num_cache_shards", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
+ .set_default(32)
+ .set_flag(Option::FLAG_STARTUP)
+ .set_description("The number of cache shards to use in the object store."),
+
Option("osd_op_num_threads_per_shard", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(0)
.set_flag(Option::FLAG_STARTUP)
return 0;
}
+size_t OSD::get_num_cache_shards()
+{
+ return cct->_conf.get_val<Option::size_t>("osd_num_cache_shards");
+}
+
int OSD::get_num_op_shards()
{
if (cct->_conf->osd_op_num_shards)
dout(2) << "journal " << journal_path << dendl;
ceph_assert(store); // call pre_init() first!
- store->set_cache_shards(get_num_op_shards());
+ store->set_cache_shards(get_num_cache_shards());
int r = store->mount();
if (r < 0) {
int init_op_flags(OpRequestRef& op);
+ size_t get_num_cache_shards();
int get_num_op_shards();
int get_num_op_threads();