]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
fix 'rados ls' issue if using keyvaluestore as objectstore backend
authorxinxin shu <xinxin.shu@intel.com>
Thu, 6 Aug 2015 07:52:44 +0000 (15:52 +0800)
committerSage Weil <sage@redhat.com>
Fri, 7 Aug 2015 19:58:16 +0000 (15:58 -0400)
Fixes: #12637
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
src/osd/PGBackend.cc

index 941569e774b52daca03ee45cfcafff3c655812a1..08912bdb2802df67647110b8598e302bda60825e 100644 (file)
@@ -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) {