]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: enforce max max for reshard logs listings 66622/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Fri, 12 Dec 2025 17:54:12 +0000 (12:54 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Fri, 23 Jan 2026 17:48:13 +0000 (12:48 -0500)
Previously a list of reshard logs could be unlimited. We need to
enforce time limits on CLS ops.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/cls/rgw/cls_rgw.cc

index 1d69ce68a586b7eb94d6bc5fc2f123221ef5512a..fbe5525a40cb9b84547936509f482d25078d68ec 100644 (file)
@@ -3580,12 +3580,10 @@ static int rgw_bi_list_op(cls_method_context_t hctx,
          op.max, max, op.reshardlog);
 
   int ret;
-  uint32_t count = 0;
-  bool more = false;
   rgw_cls_bi_list_ret op_ret;
 
   if (op.reshardlog) {
-    ret = reshard_log_list_entries(hctx, op.marker, op.max,
+    ret = reshard_log_list_entries(hctx, op.marker, max,
                                   op_ret.entries,
                                   &op_ret.is_truncated);
     if (ret < 0) {
@@ -3597,6 +3595,9 @@ static int rgw_bi_list_op(cls_method_context_t hctx,
     return 0;
   }
 
+  uint32_t count = 0;
+  bool more = false;
+
   ret = list_plain_entries(hctx, op.name_filter, op.marker, max,
                           &op_ret.entries, &more, PlainEntriesRegion::Low);
   if (ret < 0) {