auto expire_s = cct->_conf->rgw_nfs_namespace_expire_secs;
/* delay between gc cycles */
- auto delay_s = std::max(1, std::min(MIN_EXPIRE_S, expire_s/2));
+ auto delay_s = std::max(int64_t(1), std::min(int64_t(MIN_EXPIRE_S), expire_s/2));
unique_lock uniq(mtx);
restart:
/* max events to gc in one cycle */
uint32_t max_ev =
- std::max(1, get_context()->_conf->rgw_nfs_max_gc);
+ std::max(int64_t(1), get_context()->_conf->rgw_nfs_max_gc);
struct timespec now, expire_ts;
event_vector ve;
cct = _cct;
store = _store;
- max_objs = min(cct->_conf->rgw_gc_max_objs, rgw_shards_max());
+ max_objs = min(static_cast<int>(cct->_conf->rgw_gc_max_objs), rgw_shards_max());
obj_names = new string[max_objs];
uint32_t val = index;
if (!name.empty()) {
- int max_user_shards = max(cct->_conf->rgw_usage_max_user_shards, 1);
+ int max_user_shards = max(cct->_conf->rgw_usage_max_user_shards, int64_t(1));
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, 1);
+ int max_shards = max(cct->_conf->rgw_usage_max_shards, int64_t(1));
snprintf(buf, sizeof(buf), RGW_USAGE_OBJ_PREFIX "%u", (unsigned)(val % max_shards));
hash = buf;
}
* common_prefixes: if delim is filled in, any matching prefixes are placed here.
* is_truncated: if number of objects in the bucket is bigger than max, then truncated.
*/
-int RGWRados::Bucket::List::list_objects(int max, vector<rgw_bucket_dir_entry> *result,
+int RGWRados::Bucket::List::list_objects(int64_t max,
+ vector<rgw_bucket_dir_entry> *result,
map<string, bool> *common_prefixes,
bool *is_truncated)
{
public:
explicit List(RGWRados::Bucket *_target) : target(_target) {}
- int list_objects(int max, vector<rgw_bucket_dir_entry> *result, map<string, bool> *common_prefixes, bool *is_truncated);
+ int list_objects(int64_t max, vector<rgw_bucket_dir_entry> *result, map<string, bool> *common_prefixes, bool *is_truncated);
rgw_obj_key& get_next_marker() {
return next_marker;
}