}
real_time expiration = now;
- expiration += timespan(cct->_conf->rgw_data_log_window);
+ expiration += make_timespan(cct->_conf->rgw_data_log_window);
list<rgw_bucket_shard>& buckets = miter->second.first;
list<rgw_bucket_shard>::iterator liter;
status->cur_sent = now;
expiration = now;
- expiration += timespan(cct->_conf->rgw_data_log_window);
+ expiration += ceph::make_timespan(cct->_conf->rgw_data_log_window);
status->lock->Unlock();
status->pending = false;
status->cur_expiration = status->cur_sent; /* time of when operation started, not completed */
- status->cur_expiration += timespan(cct->_conf->rgw_data_log_window);
+ status->cur_expiration += make_timespan(cct->_conf->rgw_data_log_window);
status->cond = NULL;
status->lock->Unlock();
}
real_time when_need_full_sync = header.last_stats_sync;
- when_need_full_sync += timespan(store->ctx()->_conf->rgw_user_quota_sync_wait_time);
+ when_need_full_sync += make_timespan(store->ctx()->_conf->rgw_user_quota_sync_wait_time);
// check if enough time passed since last full sync
/* FIXME: missing check? */
map<string, bufferlist>::iterator cur_iter = iter;
++iter;
- if (now - pending_info.time >= timespan(cct->_conf->rgw_olh_pending_timeout_sec)) {
+ if (now - pending_info.time >= make_timespan(cct->_conf->rgw_olh_pending_timeout_sec)) {
(*rm_pending_entries)[cur_iter->first] = cur_iter->second;
pending_entries.erase(cur_iter);
} else {
int rate_limit_sec = cct->_conf->rgw_opstate_ratelimit_sec;
- if (rate_limit_sec && now - last_update < timespan(rate_limit_sec)) {
+ if (rate_limit_sec && now - last_update < make_timespan(rate_limit_sec)) {
return 0;
}
http_ret = -EINVAL;
return;
}
- http_ret = meta_log.lock_exclusive(shard_id, timespan(dur), zone_id,
+ http_ret = meta_log.lock_exclusive(shard_id, make_timespan(dur), zone_id,
locker_id);
if (http_ret == -EBUSY)
http_ret = -ERR_LOCKED;
http_ret = -EINVAL;
return;
}
- http_ret = store->data_log->lock_exclusive(shard_id, timespan(dur), zone_id, locker_id);
+ http_ret = store->data_log->lock_exclusive(shard_id, make_timespan(dur), zone_id, locker_id);
if (http_ret == -EBUSY)
http_ret = -ERR_LOCKED;
}
http_ret = -EINVAL;
return;
}
- http_ret = store->meta_mgr->lock_exclusive(metadata_key, timespan(dur), lock_id);
+ http_ret = store->meta_mgr->lock_exclusive(metadata_key, make_timespan(dur), lock_id);
if (http_ret == -EBUSY)
http_ret = -ERR_LOCKED;
}
return -EINVAL;
}
- delat_proposal += timespan(ts);
+ delat_proposal += make_timespan(ts);
if (delat_proposal < real_clock::now()) {
return -EINVAL;
}