Bug #78093
closedRGW REST Account Quota max-size Is Parsed as 32-bit Integer
0%
Description
There is an issue in the Ceph RGW REST Account Quota API where the max-size quota value is parsed as a 32-bit integer.
As a result, it is not possible to set an account quota larger than 2 GiB through the RGW REST interface.
Currently, the max-size parameter in RGWOp_Account_Quota_Set::execute() is parsed using RESTArgs::get_int32(). This limits the maximum accepted quota value to the signed 32-bit integer range.
Because account quota sizes may need to exceed 2 GiB, this causes larger quota values to be truncated to zero.
Parse max-size as int64_t instead of int32_t and use RESTArgs::get_int64() instead of RESTArgs::get_int32().
--- a/src/rgw/rgw_rest_account.cc
+++ b/src/rgw/rgw_rest_account.cc@ -273,9 +273,9 @ void RGWOp_Account_Quota_Set::execute(optional_yield y)
return;
}
- int32_t quota_max_size = 0;
+ int64_t quota_max_size = 0;
bool has_quota_max_size = false;
- RESTArgs::get_int32(s, "max-size", 0, "a_max_size, &has_quota_max_size);
+ RESTArgs::get_int64(s, "max-size", 0, "a_max_size, &has_quota_max_size);
if (has_quota_max_size) {
op_state.quota_max_size = quota_max_size;
}
CB Updated by Casey Bodley 5 months ago
- Status changed from New to Fix Under Review
- Target version deleted (
v20.2.2) - Backport set to squid tentacle umbrella
- Pull request ID set to 69876
CB Updated by Casey Bodley 5 months ago
- Assignee set to Casey Bodley
UB Updated by Upkeep Bot 5 months ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to af595ea7fbd1c0b496de69a580c3712a5c5557c8
- Fixed In set to v21.3.0-1107-gaf595ea7fb
- Upkeep Timestamp set to 2026-07-16T21:04:59+00:00
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #78317: squid: RGW REST Account Quota max-size Is Parsed as 32-bit Integer added
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #78318: tentacle: RGW REST Account Quota max-size Is Parsed as 32-bit Integer added
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #78319: umbrella: RGW REST Account Quota max-size Is Parsed as 32-bit Integer added
UB Updated by Upkeep Bot 5 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Backporting
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-07-16T21:04:59+00:00 to 2026-08-27T18:41:35+00:00