]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW - Get quota on OPs with a bucket 45343/head
authorDaniel Gryniewicz <dang@redhat.com>
Thu, 10 Mar 2022 20:01:38 +0000 (15:01 -0500)
committerDaniel Gryniewicz <dang@redhat.com>
Thu, 10 Mar 2022 20:01:38 +0000 (15:01 -0500)
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>
src/rgw/rgw_op.cc

index 89dbe92a2c8c0a97b28e21e6861635e6b6bea41f..d020d348adf7814b5542e5e53fed52008136b7ef 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;
   }