]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW - Get quota on OPs with a bucket 52935/head
authorDaniel Gryniewicz <dang@redhat.com>
Thu, 10 Mar 2022 20:01:38 +0000 (15:01 -0500)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Thu, 10 Aug 2023 19:53:52 +0000 (02:53 +0700)
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 <dang@redhat.com>
(cherry picked from commit 8966edd2fba7ace36bb3eebfbb556a1ece550fa8)

src/rgw/rgw_op.cc

index bb0f963631bb82ec463aa0fbb12168afd03c654c..55e5558826329619033bfa757d0facb701e4fa39 100644 (file)
@@ -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;
   }