From: zhangshaowen Date: Mon, 4 Nov 2019 03:06:56 +0000 (+0800) Subject: rgw: build_linked_oids_for_bucket and build_buckets_instance_index X-Git-Tag: v14.2.8~78^2~13^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8cac737318955fffe4551b4a713812f119a897a1;p=ceph.git rgw: build_linked_oids_for_bucket and build_buckets_instance_index should return negative value if it fails Fixes: https://tracker.ceph.com/issues/43452 Signed-off-by: zhangshaowen (cherry picked from commit e9e6a3664efeda9abb4ad784b98975c272667844) --- diff --git a/src/rgw/rgw_orphan.cc b/src/rgw/rgw_orphan.cc index 567bb93b4fd2e..fc6fd84abd779 100644 --- a/src/rgw/rgw_orphan.cc +++ b/src/rgw/rgw_orphan.cc @@ -375,7 +375,7 @@ int RGWOrphanSearch::build_buckets_instance_index() int ret = store->meta_mgr->list_keys_init(section, &handle); if (ret < 0) { lderr(store->ctx()) << "ERROR: can't get key: " << cpp_strerror(-ret) << dendl; - return -ret; + return ret; } map > instances; @@ -392,7 +392,7 @@ int RGWOrphanSearch::build_buckets_instance_index() ret = store->meta_mgr->list_keys_next(handle, max, keys, &truncated); if (ret < 0) { lderr(store->ctx()) << "ERROR: lists_keys_next(): " << cpp_strerror(-ret) << dendl; - return -ret; + return ret; } for (list::iterator iter = keys.begin(); iter != keys.end(); ++iter) { @@ -556,7 +556,7 @@ int RGWOrphanSearch::build_linked_oids_for_bucket(const string& bucket_instance_ &result, nullptr, &truncated); if (ret < 0) { cerr << "ERROR: store->list_objects(): " << cpp_strerror(-ret) << std::endl; - return -ret; + return ret; } for (vector::iterator iter = result.begin(); iter != result.end(); ++iter) {