]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pgbackend: if min > max ,PGBackend::objects_list_partial will list all objects of... 8678/head
authorTao Chang <changtao@hihuron.com>
Thu, 21 Apr 2016 18:05:37 +0000 (14:05 -0400)
committerTao Chang <changtao@hihuron.com>
Fri, 22 Apr 2016 09:17:32 +0000 (05:17 -0400)
Signed-off-by: Tao Chang <changtao@hihuron.com>
src/osd/PGBackend.cc

index 7351e558d8a0a8dd0b5362c2f0be91b4205f34fa..409dbca4aef8ce00824e90148a9f02e03533506e 100644 (file)
@@ -131,6 +131,10 @@ int PGBackend::objects_list_partial(
     _next = ghobject_t(begin, 0, get_parent()->whoami_shard().shard);
   ls->reserve(max);
   int r = 0;
+
+  if (min > max)
+    min = max;
+
   while (!_next.is_max() && ls->size() < (unsigned)min) {
     vector<ghobject_t> objects;
     int r = store->collection_list(