@@ -9410,7 +9410,8 @@ int RGWRados::get_bucket_stats(const DoutPrefixProvider *dpp,
94109410{
94119411 vector<rgw_bucket_dir_header> headers;
94129412 map<int , string> bucket_instance_ids;
9413- int r = cls_bucket_head (dpp, bucket_info, idx_layout, shard_id, headers, &bucket_instance_ids);
9413+ int r = svc.bi_rados ->cls_bucket_head (dpp, bucket_info, idx_layout, shard_id,
9414+ &headers, &bucket_instance_ids, y);
94149415 if (r < 0 ) {
94159416 return r;
94169417 }
@@ -10996,33 +10997,6 @@ int RGWRados::check_disk_state(const DoutPrefixProvider *dpp,
1099610997 return 0 ;
1099710998} // RGWRados::check_disk_state
1099810999
10999- int RGWRados::cls_bucket_head (const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw::bucket_index_layout_generation& idx_layout, int shard_id, vector<rgw_bucket_dir_header>& headers, map<int , string> *bucket_instance_ids)
11000- {
11001- librados::IoCtx index_pool;
11002- map<int , string> oids;
11003- map<int , struct rgw_cls_list_ret > list_results;
11004- int r = svc.bi_rados ->open_bucket_index (dpp, bucket_info, shard_id, idx_layout, &index_pool, &oids, bucket_instance_ids);
11005- if (r < 0 ) {
11006- ldpp_dout (dpp, 20 ) << " cls_bucket_head: open_bucket_index() returned "
11007- << r << dendl;
11008- return r;
11009- }
11010-
11011- maybe_warn_about_blocking (dpp); // TODO: use AioTrottle
11012- r = CLSRGWIssueGetDirHeader (index_pool, oids, list_results, cct->_conf ->rgw_bucket_index_max_aio )();
11013- if (r < 0 ) {
11014- ldpp_dout (dpp, 20 ) << " cls_bucket_head: CLSRGWIssueGetDirHeader() returned "
11015- << r << dendl;
11016- return r;
11017- }
11018-
11019- map<int , struct rgw_cls_list_ret >::iterator iter = list_results.begin ();
11020- for (; iter != list_results.end (); ++iter) {
11021- headers.push_back (std::move (iter->second .dir .header ));
11022- }
11023- return 0 ;
11024- }
11025-
1102611000int RGWRados::cls_bucket_head_async (const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info,
1102711001 const rgw::bucket_index_layout_generation& idx_layout, int shard_id,
1102811002 boost::intrusive_ptr<RGWGetDirHeader_CB> cb, int *num_aio)
0 commit comments