#define RGW_ATTR_TEMPURL_KEY1 RGW_ATTR_META_PREFIX "temp-url-key"
#define RGW_ATTR_TEMPURL_KEY2 RGW_ATTR_META_PREFIX "temp-url-key-2"
-/* Container quota of the Swift API. */
-#define RGW_ATTR_CQUOTA_NOBJS RGW_ATTR_META_PREFIX "quota-count"
-#define RGW_ATTR_CQUOTA_MSIZE RGW_ATTR_META_PREFIX "quota-bytes"
+/* Account/container quota of the Swift API. */
+#define RGW_ATTR_QUOTA_NOBJS RGW_ATTR_META_PREFIX "quota-count"
+#define RGW_ATTR_QUOTA_MSIZE RGW_ATTR_META_PREFIX "quota-bytes"
#define RGW_ATTR_OLH_PREFIX RGW_ATTR_PREFIX "olh."
}
-static int filter_out_bucket_quota(std::map<std::string, bufferlist>& add_attrs,
- const std::set<std::string>& rmattr_names,
- RGWQuotaInfo& quota)
+static int filter_out_quota_info(std::map<std::string, bufferlist>& add_attrs,
+ const std::set<std::string>& rmattr_names,
+ RGWQuotaInfo& quota)
{
/* Put new limit on max objects. */
- auto iter = add_attrs.find(RGW_ATTR_CQUOTA_NOBJS);
+ auto iter = add_attrs.find(RGW_ATTR_QUOTA_NOBJS);
std::string err;
if (std::end(add_attrs) != iter) {
quota.max_objects =
}
/* Put new limit on bucket (container) size. */
- iter = add_attrs.find(RGW_ATTR_CQUOTA_MSIZE);
+ iter = add_attrs.find(RGW_ATTR_QUOTA_MSIZE);
if (iter != add_attrs.end()) {
quota.max_size =
static_cast<int64_t>(strict_strtoll(iter->second.c_str(), 10, &err));
for (const auto& name : rmattr_names) {
/* Remove limit on max objects. */
- if (name.compare(RGW_ATTR_CQUOTA_NOBJS) == 0) {
+ if (name.compare(RGW_ATTR_QUOTA_NOBJS) == 0) {
quota.max_objects = -1;
}
/* Remove limit on max bucket size. */
- if (name.compare(RGW_ATTR_CQUOTA_MSIZE) == 0) {
+ if (name.compare(RGW_ATTR_QUOTA_MSIZE) == 0) {
quota.max_size = -1;
}
}
prepare_add_del_attrs(s->bucket_attrs, rmattr_names, attrs);
populate_with_generic_attrs(s, attrs);
- op_ret = filter_out_bucket_quota(attrs, rmattr_names, quota_info);
+ op_ret = filter_out_quota_info(attrs, rmattr_names, quota_info);
if (op_ret < 0) {
return;
}
rgw_get_request_metadata(s->cct, s->info, attrs, false);
prepare_add_del_attrs(s->bucket_attrs, rmattr_names, attrs);
populate_with_generic_attrs(s, attrs);
- op_ret = filter_out_bucket_quota(attrs, rmattr_names, s->bucket_info.quota);
+ op_ret = filter_out_quota_info(attrs, rmattr_names, s->bucket_info.quota);
if (op_ret < 0) {
return;
}
* implementation: anyone with write permissions is able to set the bucket
* quota. This stays in contrast to account quotas that can be set only by
* clients holding reseller admin privileges. */
- op_ret = filter_out_bucket_quota(attrs, rmattr_names, s->bucket_info.quota);
+ op_ret = filter_out_quota_info(attrs, rmattr_names, s->bucket_info.quota);
if (op_ret < 0) {
return;
}