From: xinxin shu Date: Thu, 6 Aug 2015 07:52:44 +0000 (+0800) Subject: fix 'rados ls' issue if using keyvaluestore as objectstore backend X-Git-Tag: v9.1.0~346^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=62214832a488d2a9e7f1e32aebf3f3182c2d109f;p=ceph.git fix 'rados ls' issue if using keyvaluestore as objectstore backend Fixes: #12637 Signed-off-by: xinxin shu --- diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index 941569e774b..08912bdb280 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -107,7 +107,9 @@ int PGBackend::objects_list_partial( // Starts with the smallest generation to make sure the result list // has the marker object (it might have multiple generations // though, which would be filtered). - ghobject_t _next(begin, 0, get_parent()->whoami_shard().shard); + ghobject_t _next; + if (!begin.is_min()) + _next = ghobject_t(begin, 0, get_parent()->whoami_shard().shard); ls->reserve(max); int r = 0; while (!_next.is_max() && ls->size() < (unsigned)min) {