@@ -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 ;
@@ -3901,7 +3902,7 @@ void RGWPutObj::execute(optional_yield y)
39013902
39023903 if (!chunked_upload) { /* with chunked upload we don't know how big is the upload.
39033904 we also check sizes at the end anyway */
3904- op_ret = s->bucket ->check_quota (this , user_quota, bucket_quota , s->content_length , y);
3905+ op_ret = s->bucket ->check_quota (this , quota , s->content_length , y);
39053906 if (op_ret < 0 ) {
39063907 ldpp_dout (this , 20 ) << " check_quota() returned ret=" << op_ret << dendl;
39073908 return ;
@@ -4124,7 +4125,7 @@ void RGWPutObj::execute(optional_yield y)
41244125 return ;
41254126 }
41264127
4127- op_ret = s->bucket ->check_quota (this , user_quota, bucket_quota , s->obj_size , y);
4128+ op_ret = s->bucket ->check_quota (this , quota , s->obj_size , y);
41284129 if (op_ret < 0 ) {
41294130 ldpp_dout (this , 20 ) << " second check_quota() returned op_ret=" << op_ret << dendl;
41304131 return ;
@@ -4344,7 +4345,7 @@ void RGWPostObj::execute(optional_yield y)
43444345 ceph::buffer::list bl, aclbl;
43454346 int len = 0 ;
43464347
4347- op_ret = s->bucket ->check_quota (this , user_quota, bucket_quota , s->content_length , y);
4348+ op_ret = s->bucket ->check_quota (this , quota , s->content_length , y);
43484349 if (op_ret < 0 ) {
43494350 return ;
43504351 }
@@ -4449,7 +4450,7 @@ void RGWPostObj::execute(optional_yield y)
44494450 s->object ->set_obj_size (ofs);
44504451
44514452
4452- op_ret = s->bucket ->check_quota (this , user_quota, bucket_quota , s->obj_size , y);
4453+ op_ret = s->bucket ->check_quota (this , quota , s->obj_size , y);
44534454 if (op_ret < 0 ) {
44544455 return ;
44554456 }
@@ -4625,7 +4626,7 @@ void RGWPutMetadataAccount::execute(optional_yield y)
46254626
46264627 /* Handle the quota extracted at the verify_permission step. */
46274628 if (new_quota_extracted) {
4628- s->user ->get_info ().user_quota = std::move (new_quota);
4629+ s->user ->get_info ().quota . user_quota = std::move (new_quota);
46294630 }
46304631
46314632 /* We are passing here the current (old) user info to allow the function
@@ -5476,8 +5477,7 @@ void RGWCopyObj::execute(optional_yield y)
54765477 return ;
54775478 }
54785479 // enforce quota against the destination bucket owner
5479- op_ret = dest_bucket->check_quota (this , user_quota, bucket_quota,
5480- astate->accounted_size , y);
5480+ op_ret = dest_bucket->check_quota (this , quota, astate->accounted_size , y);
54815481 if (op_ret < 0 ) {
54825482 return ;
54835483 }
@@ -7419,7 +7419,7 @@ int RGWBulkUploadOp::handle_file(const std::string_view path,
74197419 return op_ret;
74207420 }
74217421
7422- op_ret = bucket->check_quota (this , user_quota, bucket_quota , size, y);
7422+ op_ret = bucket->check_quota (this , quota , size, y);
74237423 if (op_ret < 0 ) {
74247424 return op_ret;
74257425 }
@@ -7497,7 +7497,7 @@ int RGWBulkUploadOp::handle_file(const std::string_view path,
74977497 return op_ret;
74987498 }
74997499
7500- op_ret = bucket->check_quota (this , user_quota, bucket_quota , size, y);
7500+ op_ret = bucket->check_quota (this , quota , size, y);
75017501 if (op_ret < 0 ) {
75027502 ldpp_dout (this , 20 ) << " quota exceeded for path=" << path << dendl;
75037503 return op_ret;
0 commit comments