From: Tao Chang Date: Thu, 21 Apr 2016 18:05:37 +0000 (-0400) Subject: pgbackend: if min > max ,PGBackend::objects_list_partial will list all objects of... X-Git-Tag: v11.0.0~842^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F8678%2Fhead;p=ceph.git pgbackend: if min > max ,PGBackend::objects_list_partial will list all objects of that pg Signed-off-by: Tao Chang --- diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index 7351e558d8a..409dbca4aef 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -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 objects; int r = store->collection_list(