@@ -1357,18 +1357,19 @@ int RGWOp::init_quota()
13571357 if (r < 0 )
13581358 return r;
13591359 user = owner_user.get ();
1360+
13601361 }
13611362
1362- store->get_quota (bucket_quota, user_quota );
1363+ store->get_quota (quota );
13631364
13641365 if (s->bucket ->get_info ().quota .enabled ) {
1365- bucket_quota = s->bucket ->get_info ().quota ;
1366- } else if (user->get_info ().bucket_quota .enabled ) {
1367- bucket_quota = user->get_info ().bucket_quota ;
1366+ quota. bucket_quota = s->bucket ->get_info ().quota ;
1367+ } else if (user->get_info ().quota . bucket_quota .enabled ) {
1368+ quota. bucket_quota = user->get_info (). quota .bucket_quota ;
13681369 }
13691370
1370- if (user->get_info ().user_quota .enabled ) {
1371- user_quota = user->get_info ().user_quota ;
1371+ if (user->get_info ().quota . user_quota .enabled ) {
1372+ quota. user_quota = user->get_info (). quota .user_quota ;
13721373 }
13731374
13741375 return 0 ;
@@ -3896,7 +3897,7 @@ void RGWPutObj::execute(optional_yield y)
38963897
38973898 if (!chunked_upload) { /* with chunked upload we don't know how big is the upload.
38983899 we also check sizes at the end anyway */
3899- op_ret = s->bucket ->check_quota (this , user_quota, bucket_quota , s->content_length , y);
3900+ op_ret = s->bucket ->check_quota (this , quota , s->content_length , y);
39003901 if (op_ret < 0 ) {
39013902 ldpp_dout (this , 20 ) << " check_quota() returned ret=" << op_ret << dendl;
39023903 return ;
@@ -4119,7 +4120,7 @@ void RGWPutObj::execute(optional_yield y)
41194120 return ;
41204121 }
41214122
4122- op_ret = s->bucket ->check_quota (this , user_quota, bucket_quota , s->obj_size , y);
4123+ op_ret = s->bucket ->check_quota (this , quota , s->obj_size , y);
41234124 if (op_ret < 0 ) {
41244125 ldpp_dout (this , 20 ) << " second check_quota() returned op_ret=" << op_ret << dendl;
41254126 return ;
@@ -4339,7 +4340,7 @@ void RGWPostObj::execute(optional_yield y)
43394340 ceph::buffer::list bl, aclbl;
43404341 int len = 0 ;
43414342
4342- op_ret = s->bucket ->check_quota (this , user_quota, bucket_quota , s->content_length , y);
4343+ op_ret = s->bucket ->check_quota (this , quota , s->content_length , y);
43434344 if (op_ret < 0 ) {
43444345 return ;
43454346 }
@@ -4444,7 +4445,7 @@ void RGWPostObj::execute(optional_yield y)
44444445 s->object ->set_obj_size (ofs);
44454446
44464447
4447- op_ret = s->bucket ->check_quota (this , user_quota, bucket_quota , s->obj_size , y);
4448+ op_ret = s->bucket ->check_quota (this , quota , s->obj_size , y);
44484449 if (op_ret < 0 ) {
44494450 return ;
44504451 }
@@ -4620,7 +4621,7 @@ void RGWPutMetadataAccount::execute(optional_yield y)
46204621
46214622 /* Handle the quota extracted at the verify_permission step. */
46224623 if (new_quota_extracted) {
4623- s->user ->get_info ().user_quota = std::move (new_quota);
4624+ s->user ->get_info ().quota . user_quota = std::move (new_quota);
46244625 }
46254626
46264627 /* We are passing here the current (old) user info to allow the function
@@ -5471,8 +5472,7 @@ void RGWCopyObj::execute(optional_yield y)
54715472 return ;
54725473 }
54735474 // enforce quota against the destination bucket owner
5474- op_ret = dest_bucket->check_quota (this , user_quota, bucket_quota,
5475- astate->accounted_size , y);
5475+ op_ret = dest_bucket->check_quota (this , quota, astate->accounted_size , y);
54765476 if (op_ret < 0 ) {
54775477 return ;
54785478 }
@@ -7412,7 +7412,7 @@ int RGWBulkUploadOp::handle_file(const std::string_view path,
74127412 return op_ret;
74137413 }
74147414
7415- op_ret = bucket->check_quota (this , user_quota, bucket_quota , size, y);
7415+ op_ret = bucket->check_quota (this , quota , size, y);
74167416 if (op_ret < 0 ) {
74177417 return op_ret;
74187418 }
@@ -7490,7 +7490,7 @@ int RGWBulkUploadOp::handle_file(const std::string_view path,
74907490 return op_ret;
74917491 }
74927492
7493- op_ret = bucket->check_quota (this , user_quota, bucket_quota , size, y);
7493+ op_ret = bucket->check_quota (this , quota , size, y);
74947494 if (op_ret < 0 ) {
74957495 ldpp_dout (this , 20 ) << " quota exceeded for path=" << path << dendl;
74967496 return op_ret;
0 commit comments