{
vector<rgw_bucket_dir_header> headers;
map<int, string> bucket_instance_ids;
- int r = cls_bucket_head(dpp, bucket_info, idx_layout, shard_id, headers, &bucket_instance_ids);
+ int r = svc.bi_rados->cls_bucket_head(dpp, bucket_info, idx_layout, shard_id,
+ &headers, &bucket_instance_ids, y);
if (r < 0) {
return r;
}
return 0;
} // RGWRados::check_disk_state
-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)
-{
- librados::IoCtx index_pool;
- map<int, string> oids;
- map<int, struct rgw_cls_list_ret> list_results;
- int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, shard_id, idx_layout, &index_pool, &oids, bucket_instance_ids);
- if (r < 0) {
- ldpp_dout(dpp, 20) << "cls_bucket_head: open_bucket_index() returned "
- << r << dendl;
- return r;
- }
-
- maybe_warn_about_blocking(dpp); // TODO: use AioTrottle
- r = CLSRGWIssueGetDirHeader(index_pool, oids, list_results, cct->_conf->rgw_bucket_index_max_aio)();
- if (r < 0) {
- ldpp_dout(dpp, 20) << "cls_bucket_head: CLSRGWIssueGetDirHeader() returned "
- << r << dendl;
- return r;
- }
-
- map<int, struct rgw_cls_list_ret>::iterator iter = list_results.begin();
- for(; iter != list_results.end(); ++iter) {
- headers.push_back(std::move(iter->second.dir.header));
- }
- return 0;
-}
-
int RGWRados::cls_bucket_head_async(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info,
const rgw::bucket_index_layout_generation& idx_layout, int shard_id,
boost::intrusive_ptr<RGWGetDirHeader_CB> cb, int *num_aio)
rgw_obj_index_key *last_entry,
optional_yield y,
RGWBucketListNameFilter force_check_filter = {});
- int cls_bucket_head(const DoutPrefixProvider *dpp,
- const RGWBucketInfo& bucket_info,
- const rgw::bucket_index_layout_generation& idx_layout,
- int shard_id, std::vector<rgw_bucket_dir_header>& headers,
- std::map<int, std::string> *bucket_instance_ids = NULL);
int cls_bucket_head_async(const DoutPrefixProvider *dpp,
const RGWBucketInfo& bucket_info,
const rgw::bucket_index_layout_generation& idx_layout,
uint64_t gen_id, const std::string& obj_key,
std::string* bucket_obj, int* shard_id);
+public:
+
int cls_bucket_head(const DoutPrefixProvider *dpp,
const RGWBucketInfo& bucket_info,
const rgw::bucket_index_layout_generation& idx_layout,
std::map<int, std::string> *bucket_instance_ids,
optional_yield y);
-public:
-
librados::Rados* rados{nullptr};
struct Svc {