]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PGBackend: fix collection_list shadow return value 11927/head
authorHaomai Wang <haomai@xsky.com>
Sun, 9 Oct 2016 10:31:54 +0000 (18:31 +0800)
committerNathan Cutler <ncutler@suse.com>
Sat, 12 Nov 2016 10:05:42 +0000 (11:05 +0100)
Fixes: http://tracker.ceph.com/issues/17713
Signed-off-by: Haomai Wang <haomai@xsky.com>
(cherry picked from commit 8a53a604f375eb568a6fc88a402a6afd83fa151a)

Conflicts:
src/osd/PGBackend.cc (master is using store->collection_list and ch;
            hammer is using store->collection_list_partial and coll)

src/osd/PGBackend.cc

index ef8012df6316ec720d0c54753e84c1bb3f4f31ba..15ad655fad81d54ffb04e455b1ced430e6c4213f 100644 (file)
@@ -124,7 +124,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_partial(
+    r = store->collection_list_partial(
       coll,
       _next,
       min - ls->size(),
@@ -132,8 +132,10 @@ int PGBackend::objects_list_partial(
       seq,
       &objects,
       &_next);
-    if (r != 0)
+    if (r != 0) {
+      derr << __func__ << " list collection " << coll << " got: " << cpp_strerror(r) << dendl;
       break;
+    }
     for (vector<ghobject_t>::iterator i = objects.begin();
         i != objects.end();
         ++i) {