From: Daniel Gryniewicz Date: Thu, 10 Mar 2022 20:01:38 +0000 (-0500) Subject: RGW - Get quota on OPs with a bucket X-Git-Tag: v18.0.0~1260^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8966edd2fba7ace36bb3eebfbb556a1ece550fa8;p=ceph.git RGW - Get quota on OPs with a bucket Bucket head OPs should have quota in the output. However, we were only fetching quota on OPs that also had an object. The object itself is not necessary for quota (although a bucket is). Change it so that we get quota on bucket OPs as well. Fixes https://tracker.ceph.com/issues/54488 Signed-off-by: Daniel Gryniewicz --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 89dbe92a2c8c0..d020d348adf78 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -1350,9 +1350,8 @@ int RGWOp::init_quota() return 0; } - /* only interested in object related ops */ - if (rgw::sal::Bucket::empty(s->bucket.get()) - || rgw::sal::Object::empty(s->object.get())) { + /* Need a bucket to get quota */ + if (rgw::sal::Bucket::empty(s->bucket.get())) { return 0; }