Option("rgw_nfs_namespace_expire_secs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(300)
+ .set_min(1)
.set_description(""),
Option("rgw_nfs_max_gc", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(300)
+ .set_min(1)
.set_description(""),
Option("rgw_nfs_write_completion_interval_s", Option::TYPE_INT, Option::LEVEL_ADVANCED)
Option("rgw_usage_max_user_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(1)
+ .set_min(1)
.set_description(""),
Option("rgw_enable_ops_log", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
= get_context()->_conf->rgw_nfs_namespace_expire_secs;
/* max events to gc in one cycle */
- uint32_t max_ev =
- std::max(int64_t(1), get_context()->_conf->rgw_nfs_max_gc);
+ uint32_t max_ev = get_context()->_conf->rgw_nfs_max_gc;
struct timespec now, expire_ts;
event_vector ve;
uint32_t val = index;
if (!name.empty()) {
- int max_user_shards = max(cct->_conf->rgw_usage_max_user_shards, int64_t(1));
+ int max_user_shards = cct->_conf->rgw_usage_max_user_shards;
val %= max_user_shards;
val += ceph_str_hash_linux(name.c_str(), name.size());
}
char buf[17];
- int max_shards = max(cct->_conf->rgw_usage_max_shards, int64_t(1));
+ int max_shards = cct->_conf->rgw_usage_max_shards;
snprintf(buf, sizeof(buf), RGW_USAGE_OBJ_PREFIX "%u", (unsigned)(val % max_shards));
hash = buf;
}