]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PGBackend: fix collection_list shadow return value 11737/head
authorHaomai Wang <haomai@xsky.com>
Sun, 9 Oct 2016 10:31:54 +0000 (18:31 +0800)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Wed, 2 Nov 2016 06:46:18 +0000 (12:16 +0530)
Fixes: http://tracker.ceph.com/issues/17713
Signed-off-by: Haomai Wang <haomai@xsky.com>
(cherry picked from commit 8a53a604f375eb568a6fc88a402a6afd83fa151a)

src/osd/PGBackend.cc

index 7351e558d8a0a8dd0b5362c2f0be91b4205f34fa..35183cc6a43bd8b1c9094722fabd3c7fdb1fd664 100644 (file)
@@ -133,7 +133,7 @@ int PGBackend::objects_list_partial(
   int r = 0;
   while (!_next.is_max() && ls->size() < (unsigned)min) {
     vector<ghobject_t> objects;
-    int r = store->collection_list(
+    r = store->collection_list(
       ch,
       _next,
       ghobject_t::get_max(),
@@ -141,8 +141,10 @@ int PGBackend::objects_list_partial(
       max - ls->size(),
       &objects,
       &_next);
-    if (r != 0)
+    if (r != 0) {
+      derr << __func__ << " list collection " << ch << " got: " << cpp_strerror(r) << dendl;
       break;
+    }
     for (vector<ghobject_t>::iterator i = objects.begin();
         i != objects.end();
         ++i) {