From 62214832a488d2a9e7f1e32aebf3f3182c2d109f Mon Sep 17 00:00:00 2001 From: xinxin shu Date: Thu, 6 Aug 2015 15:52:44 +0800 Subject: [PATCH] fix 'rados ls' issue if using keyvaluestore as objectstore backend Fixes: #12637 Signed-off-by: xinxin shu --- src/osd/PGBackend.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index 941569e774b52..08912bdb2802d 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) { -- 2.39.5