]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/cls/rgw/cls_rgw.cc
import ceph nautilus 14.2.2
[ceph.git] / ceph / src / cls / rgw / cls_rgw.cc
index a332737427704c0689dcc92f1bda98b7bb4b9833..fd707eeea9b4406506de162b4c8b01510d083534 100644 (file)
@@ -173,9 +173,13 @@ static int get_obj_vals(cls_method_context_t hctx, const string& start, const st
   auto upper = std::lower_bound(lower, pkeys->end(), new_start, comp);
   pkeys->erase(lower, upper);
 
-  if (num_entries == (int)pkeys->size())
+  if (num_entries == (int)pkeys->size() || !(*pmore))
     return 0;
 
+  if (pkeys->size() && new_start < pkeys->rbegin()->first) {
+    new_start = pkeys->rbegin()->first;
+  }
+
   map<string, bufferlist> new_keys;
 
   /* now get some more keys */