Skip to content

Commit

Permalink
osd/PGBackend: fix collection_list shadow return value
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/17713
Signed-off-by: Haomai Wang <haomai@xsky.com>
  • Loading branch information
yuyuyu101 committed Oct 26, 2016
1 parent cece97d commit 8a53a60
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/osd/PGBackend.cc
Expand Up @@ -140,16 +140,18 @@ int PGBackend::objects_list_partial(

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(),
parent->sort_bitwise(),
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) {
Expand Down

0 comments on commit 8a53a60

Please sign in to comment.