]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add optional_yield to RGWRados::get_bucket_info()
authorAli Maredia <amaredia@redhat.com>
Tue, 30 Apr 2019 21:02:28 +0000 (17:02 -0400)
committerAli Maredia <amaredia@redhat.com>
Fri, 17 May 2019 20:00:38 +0000 (16:00 -0400)
Signed-off-by: Ali Maredia <amaredia@redhat.com>
18 files changed:
src/rgw/rgw_admin.cc
src/rgw/rgw_bucket.cc
src/rgw/rgw_cr_tools.cc
src/rgw/rgw_lc.cc
src/rgw/rgw_op.cc
src/rgw/rgw_orphan.cc
src/rgw/rgw_pubsub.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h
src/rgw/rgw_reshard.cc
src/rgw/rgw_rest_bucket.cc
src/rgw/rgw_rest_log.cc
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_swift.cc
src/rgw/rgw_swift_auth.cc
src/rgw/rgw_sync_module_pubsub_rest.cc
src/rgw/rgw_tools.cc
src/rgw/rgw_user.cc

index 51c74621bbec47d8166b28323b758207fd71c7f7..84c1c395d4d237bba75e0843eccf0bd2bc9fabdd 100644 (file)
@@ -1188,7 +1188,7 @@ static int init_bucket(const string& tenant_name, const string& bucket_name, con
     auto obj_ctx = store->svc.sysobj->init_obj_ctx();
     int r;
     if (bucket_id.empty()) {
-      r = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, nullptr, pattrs);
+      r = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, nullptr, null_yield, pattrs);
     } else {
       string bucket_instance_id = bucket_name + ":" + bucket_id;
       r = store->get_bucket_instance_info(obj_ctx, bucket_instance_id, bucket_info, NULL, pattrs);
@@ -1372,7 +1372,7 @@ int set_bucket_quota(RGWRados *store, int opt_cmd,
   RGWBucketInfo bucket_info;
   map<string, bufferlist> attrs;
   auto obj_ctx = store->svc.sysobj->init_obj_ctx();
-  int r = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, NULL, &attrs);
+  int r = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, NULL, null_yield, &attrs);
   if (r < 0) {
     cerr << "could not get bucket info for bucket=" << bucket_name << ": " << cpp_strerror(-r) << std::endl;
     return -r;
@@ -1640,7 +1640,7 @@ int set_bucket_sync_enabled(RGWRados *store, int opt_cmd, const string& tenant_n
   map<string, bufferlist> attrs;
   auto obj_ctx = store->svc.sysobj->init_obj_ctx();
 
-  int r = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, NULL, &attrs);
+  int r = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, NULL, null_yield, &attrs);
   if (r < 0) {
     cerr << "could not get bucket info for bucket=" << bucket_name << ": " << cpp_strerror(-r) << std::endl;
     return -r;
index 8c78fdf10d5a8eec49c84745d25c96938ebcb52f..f0305cc30fa8337c357a0617bf3530e1a9d830a4 100644 (file)
@@ -169,7 +169,7 @@ int rgw_bucket_sync_user_stats(RGWRados *store, const string& tenant_name, const
 {
   RGWBucketInfo bucket_info;
   RGWSysObjectCtx obj_ctx = store->svc.sysobj->init_obj_ctx();
-  int ret = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, NULL);
+  int ret = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, NULL, null_yield);
   if (ret < 0) {
     ldout(store->ctx(), 0) << "ERROR: could not fetch bucket info: ret=" << ret << dendl;
     return ret;
@@ -472,7 +472,7 @@ void check_bad_user_bucket_mapping(RGWRados *store, const rgw_user& user_id,
       RGWBucketInfo bucket_info;
       real_time mtime;
       RGWSysObjectCtx obj_ctx = store->svc.sysobj->init_obj_ctx();
-      int r = store->get_bucket_info(obj_ctx, user_id.tenant, bucket.name, bucket_info, &mtime);
+      int r = store->get_bucket_info(obj_ctx, user_id.tenant, bucket.name, bucket_info, &mtime, null_yield);
       if (r < 0) {
         ldout(store->ctx(), 0) << "could not get bucket info for bucket=" << bucket << dendl;
         continue;
@@ -529,7 +529,7 @@ int rgw_remove_bucket(RGWRados *store, rgw_bucket& bucket, bool delete_children)
 
   string bucket_ver, master_ver;
 
-  ret = store->get_bucket_info(obj_ctx, bucket.tenant, bucket.name, info, NULL);
+  ret = store->get_bucket_info(obj_ctx, bucket.tenant, bucket.name, info, NULL, null_yield);
   if (ret < 0)
     return ret;
 
@@ -635,7 +635,7 @@ int rgw_remove_bucket_bypass_gc(RGWRados *store, rgw_bucket& bucket,
 
   string bucket_ver, master_ver;
 
-  ret = store->get_bucket_info(sysobj_ctx, bucket.tenant, bucket.name, info, NULL);
+  ret = store->get_bucket_info(sysobj_ctx, bucket.tenant, bucket.name, info, NULL, null_yield);
   if (ret < 0)
     return ret;
 
@@ -796,7 +796,7 @@ int RGWBucket::init(RGWRados *storage, RGWBucketAdminOpState& op_state)
     return -EINVAL;
 
   if (!bucket_name.empty()) {
-    int r = store->get_bucket_info(obj_ctx, tenant, bucket_name, bucket_info, NULL);
+    int r = store->get_bucket_info(obj_ctx, tenant, bucket_name, bucket_info, NULL, null_yield);
     if (r < 0) {
       ldout(store->ctx(), 0) << "could not get bucket info for bucket=" << bucket_name << dendl;
       return r;
@@ -941,7 +941,7 @@ int RGWBucket::set_quota(RGWBucketAdminOpState& op_state, std::string *err_msg)
   RGWBucketInfo bucket_info;
   map<string, bufferlist> attrs;
   auto obj_ctx = store->svc.sysobj->init_obj_ctx();
-  int r = store->get_bucket_info(obj_ctx, bucket.tenant, bucket.name, bucket_info, NULL, &attrs);
+  int r = store->get_bucket_info(obj_ctx, bucket.tenant, bucket.name, bucket_info, NULL, null_yield, &attrs);
   if (r < 0) {
     set_err_msg(err_msg, "could not get bucket info for bucket=" + bucket.name + ": " + cpp_strerror(-r));
     return r;
@@ -1242,7 +1242,7 @@ int RGWBucket::get_policy(RGWBucketAdminOpState& op_state, RGWAccessControlPolic
 
   RGWBucketInfo bucket_info;
   map<string, bufferlist> attrs;
-  int ret = store->get_bucket_info(sysobj_ctx, bucket.tenant, bucket.name, bucket_info, NULL, &attrs);
+  int ret = store->get_bucket_info(sysobj_ctx, bucket.tenant, bucket.name, bucket_info, NULL, null_yield, &attrs);
   if (ret < 0) {
     return ret;
   }
@@ -1425,7 +1425,7 @@ static int bucket_stats(RGWRados *store, const std::string& tenant_name, std::st
 
   real_time mtime;
   auto obj_ctx = store->svc.sysobj->init_obj_ctx();
-  int r = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, &mtime);
+  int r = store->get_bucket_info(obj_ctx, tenant_name, bucket_name, bucket_info, &mtime, null_yield);
   if (r < 0)
     return r;
 
@@ -1518,7 +1518,7 @@ int RGWBucketAdminOp::limit_check(RGWRados *store,
                               * the loop body */
 
        ret = store->get_bucket_info(obj_ctx, bucket.tenant, bucket.name,
-                                    info, nullptr);
+                                    info, nullptr, null_yield);
        if (ret < 0)
          continue;
 
@@ -1737,7 +1737,7 @@ void get_stale_instances(RGWRados *store, const std::string& bucket_name,
   // all the instances
   auto [tenant, bucket] = split_tenant(bucket_name);
   RGWBucketInfo cur_bucket_info;
-  int r = store->get_bucket_info(obj_ctx, tenant, bucket, cur_bucket_info, nullptr);
+  int r = store->get_bucket_info(obj_ctx, tenant, bucket, cur_bucket_info, nullptr, null_yield);
   if (r < 0) {
     if (r == -ENOENT) {
       // bucket doesn't exist, everything is stale then
@@ -1887,7 +1887,7 @@ static int fix_single_bucket_lc(RGWRados *store,
   RGWBucketInfo bucket_info;
   map <std::string, bufferlist> bucket_attrs;
   int ret = store->get_bucket_info(obj_ctx, tenant_name, bucket_name,
-                                   bucket_info, nullptr, &bucket_attrs);
+                                   bucket_info, nullptr, null_yield, &bucket_attrs);
   if (ret < 0) {
     // TODO: Should we handle the case where the bucket could've been removed between
     // listing and fetching?
index d84d1ec22a28e585e519a8ed7fac749665ed98c9..b79e76b56f3de4048197bc19e9b75fbee8f3e70b 100644 (file)
@@ -95,7 +95,7 @@ int RGWGetBucketInfoCR::Request::_send_request()
 {
   RGWSysObjectCtx obj_ctx(store->svc.sysobj->init_obj_ctx());
   return store->get_bucket_info(obj_ctx, params.tenant, params.bucket_name,
-                                result->bucket_info, &result->mtime, &result->attrs);
+                                result->bucket_info, &result->mtime, null_yield, &result->attrs);
 }
 
 template<>
@@ -125,7 +125,7 @@ int RGWBucketCreateLocalCR::Request::_send_request()
   map<string, bufferlist> bucket_attrs;
 
   int ret = store->get_bucket_info(sysobj_ctx, user.tenant, bucket_name,
-                                 bucket_info, nullptr, &bucket_attrs);
+                                 bucket_info, nullptr, null_yield, &bucket_attrs);
   if (ret < 0 && ret != -ENOENT)
     return ret;
   bool bucket_exists = (ret != -ENOENT);
index bea92b2b18bd25f0629b0c5d65075ad26c5fd70e..ab7006e29b7276f3af7f410ebc0caaff03789a78 100644 (file)
@@ -955,7 +955,7 @@ int RGWLC::bucket_lc_process(string& shard_id)
   string bucket_tenant = result[0];
   string bucket_name = result[1];
   string bucket_marker = result[2];
-  int ret = store->get_bucket_info(obj_ctx, bucket_tenant, bucket_name, bucket_info, NULL, &bucket_attrs);
+  int ret = store->get_bucket_info(obj_ctx, bucket_tenant, bucket_name, bucket_info, NULL, null_yield, &bucket_attrs);
   if (ret < 0) {
     ldpp_dout(this, 0) << "LC:get_bucket_info for " << bucket_name << " failed" << dendl;
     return ret;
index 65f8ce159b1fe25bf03c2aab1d752f34328e493d..74377667fe5ee831b22b354074d2e0065df3370b 100644 (file)
@@ -585,7 +585,7 @@ int rgw_build_bucket_policies(RGWRados* store, struct req_state* s)
     RGWBucketInfo source_info;
 
     if (s->bucket_instance_id.empty()) {
-      ret = store->get_bucket_info(obj_ctx, s->src_tenant_name, s->src_bucket_name, source_info, NULL);
+      ret = store->get_bucket_info(obj_ctx, s->src_tenant_name, s->src_bucket_name, source_info, NULL, s->yield);
     } else {
       ret = store->get_bucket_instance_info(obj_ctx, s->bucket_instance_id, source_info, NULL, NULL);
     }
@@ -608,7 +608,7 @@ int rgw_build_bucket_policies(RGWRados* store, struct req_state* s)
     if (s->bucket_instance_id.empty()) {
       ret = store->get_bucket_info(obj_ctx, s->bucket_tenant, s->bucket_name,
                                    s->bucket_info, &s->bucket_mtime,
-                                   &s->bucket_attrs);
+                                   s->yield, &s->bucket_attrs);
     } else {
       ret = store->get_bucket_instance_info(obj_ctx, s->bucket_instance_id,
                                             s->bucket_info, &s->bucket_mtime,
@@ -1687,7 +1687,7 @@ int RGWGetObj::handle_user_manifest(const char *prefix)
     auto obj_ctx = store->svc.sysobj->init_obj_ctx();
     int r = store->get_bucket_info(obj_ctx, s->user->user_id.tenant,
                                  bucket_name, bucket_info, NULL,
-                                 &bucket_attrs);
+                                 s->yield, &bucket_attrs);
     if (r < 0) {
       ldpp_dout(this, 0) << "could not get bucket info for bucket="
                       << bucket_name << dendl;
@@ -1821,7 +1821,7 @@ int RGWGetObj::handle_slo_manifest(bufferlist& bl)
         auto obj_ctx = store->svc.sysobj->init_obj_ctx();
         int r = store->get_bucket_info(obj_ctx, s->user->user_id.tenant,
                                        bucket_name, bucket_info, nullptr,
-                                       &bucket_attrs);
+                                       s->yield, &bucket_attrs);
         if (r < 0) {
           ldpp_dout(this, 0) << "could not get bucket info for bucket="
                           << bucket_name << dendl;
@@ -2983,7 +2983,7 @@ void RGWCreateBucket::execute()
   /* we need to make sure we read bucket info, it's not read before for this
    * specific request */
   op_ret = store->get_bucket_info(*s->sysobj_ctx, s->bucket_tenant, s->bucket_name,
-                                 s->bucket_info, nullptr, &s->bucket_attrs);
+                                 s->bucket_info, nullptr, s->yield, &s->bucket_attrs);
   if (op_ret < 0 && op_ret != -ENOENT)
     return;
   s->bucket_exists = (op_ret != -ENOENT);
@@ -3149,7 +3149,7 @@ void RGWCreateBucket::execute()
       map<string, bufferlist> battrs;
 
       op_ret = store->get_bucket_info(*s->sysobj_ctx, s->bucket_tenant, s->bucket_name,
-                                      binfo, nullptr, &battrs);
+                                      binfo, nullptr, s->yield, &battrs);
       if (op_ret < 0) {
         return;
       } else if (binfo.owner.compare(s->user->user_id) != 0) {
@@ -4665,7 +4665,7 @@ int RGWCopyObj::verify_permission()
   map<string, bufferlist> src_attrs;
 
   if (s->bucket_instance_id.empty()) {
-    op_ret = store->get_bucket_info(*s->sysobj_ctx, src_tenant_name, src_bucket_name, src_bucket_info, NULL, &src_attrs);
+    op_ret = store->get_bucket_info(*s->sysobj_ctx, src_tenant_name, src_bucket_name, src_bucket_info, NULL, s->yield, &src_attrs);
   } else {
     /* will only happen in intra region sync where the source and dest bucket is the same */
     op_ret = store->get_bucket_instance_info(*s->sysobj_ctx, s->bucket_instance_id, src_bucket_info, NULL, &src_attrs);
@@ -4736,7 +4736,7 @@ int RGWCopyObj::verify_permission()
     dest_attrs = src_attrs;
   } else {
     op_ret = store->get_bucket_info(*s->sysobj_ctx, dest_tenant_name, dest_bucket_name,
-                                    dest_bucket_info, nullptr, &dest_attrs);
+                                    dest_bucket_info, nullptr, s->yield, &dest_attrs);
     if (op_ret < 0) {
       if (op_ret == -ENOENT) {
         op_ret = -ERR_NO_SUCH_BUCKET;
@@ -6236,7 +6236,7 @@ bool RGWBulkDelete::Deleter::delete_single(const acct_path_t& path)
 
   int ret = store->get_bucket_info(*s->sysobj_ctx, s->user->user_id.tenant,
                                    path.bucket_name, binfo, nullptr,
-                                   &battrs);
+                                   s->yield, &battrs);
   if (ret < 0) {
     goto binfo_fail;
   }
@@ -6521,7 +6521,7 @@ int RGWBulkUploadOp::handle_dir(const boost::string_ref path)
   RGWBucketInfo binfo;
   std::map<std::string, ceph::bufferlist> battrs;
   op_ret = store->get_bucket_info(*dir_ctx, s->bucket_tenant, bucket_name,
-                                  binfo, nullptr, &battrs);
+                                  binfo, nullptr, s->yield, &battrs);
   if (op_ret < 0 && op_ret != -ENOENT) {
     return op_ret;
   }
@@ -6715,7 +6715,7 @@ int RGWBulkUploadOp::handle_file(const boost::string_ref path,
   std::map<std::string, ceph::bufferlist> battrs;
   ACLOwner bowner;
   op_ret = store->get_bucket_info(*s->sysobj_ctx, s->user->user_id.tenant,
-                                  bucket_name, binfo, nullptr, &battrs);
+                                  bucket_name, binfo, nullptr, s->yield, &battrs);
   if (op_ret == -ENOENT) {
     ldpp_dout(this, 20) << "non existent directory=" << bucket_name << dendl;
   } else if (op_ret < 0) {
index 567bb93b4fd2eee160890b38d10077468cb6a640..29aa884ca547ba44e550edb2ce21d8e2e5f27ba5 100644 (file)
@@ -501,7 +501,7 @@ int RGWOrphanSearch::build_linked_oids_for_bucket(const string& bucket_instance_
 
   RGWBucketInfo cur_bucket_info;
   ret = store->get_bucket_info(sysobj_ctx, orphan_bucket.tenant,
-                              orphan_bucket.name, cur_bucket_info, nullptr);
+                              orphan_bucket.name, cur_bucket_info, nullptr, null_yield);
   if (ret < 0) {
     if (ret == -ENOENT) {
       /* probably raced with bucket removal */
index 1bbfbf594e9eadfd0f8a86621be3f2c583ae3f0e..5e149a4ca64d018fffd675e515c87bf248f04604 100644 (file)
@@ -515,7 +515,7 @@ int RGWUserPubSub::SubWithEvents<EventType>::list_events(const string& marker, i
   RGWBucketInfo bucket_info;
   string tenant;
   RGWSysObjectCtx obj_ctx(store->svc.sysobj->init_obj_ctx());
-  ret = store->get_bucket_info(obj_ctx, tenant, sub_conf.dest.bucket_name, bucket_info, nullptr, nullptr);
+  ret = store->get_bucket_info(obj_ctx, tenant, sub_conf.dest.bucket_name, bucket_info, nullptr, null_yield, nullptr);
   if (ret == -ENOENT) {
     list.is_truncated = false;
     return 0;
@@ -581,7 +581,7 @@ int RGWUserPubSub::SubWithEvents<EventType>::remove_event(const string& event_id
   RGWBucketInfo bucket_info;
   string tenant;
   RGWSysObjectCtx sysobj_ctx(store->svc.sysobj->init_obj_ctx());
-  ret = store->get_bucket_info(sysobj_ctx, tenant, sub_conf.dest.bucket_name, bucket_info, nullptr, nullptr);
+  ret = store->get_bucket_info(sysobj_ctx, tenant, sub_conf.dest.bucket_name, bucket_info, nullptr, null_yield, nullptr);
   if (ret < 0) {
     ldout(store->ctx(), 1) << "ERROR: failed to read bucket info for events bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
     return ret;
index 0a2ead992b63718b7113b7586879132d6ccb16e1..0c88d48bd32d4eba5290e6172a85df04122628ce 100644 (file)
@@ -2854,7 +2854,7 @@ int RGWRados::create_bucket(const RGWUserInfo& owner, rgw_bucket& bucket,
       RGWObjVersionTracker instance_ver = info.objv_tracker;
       info.objv_tracker.clear();
       auto obj_ctx = svc.sysobj->init_obj_ctx();
-      r = get_bucket_info(obj_ctx, bucket.tenant, bucket.name, info, NULL, NULL);
+      r = get_bucket_info(obj_ctx, bucket.tenant, bucket.name, info, NULL, null_yield, NULL);
       if (r < 0) {
         if (r == -ENOENT) {
           continue;
@@ -3365,7 +3365,7 @@ int RGWRados::swift_versioning_copy(RGWObjectCtx& obj_ctx,
 
   auto sysobj_ctx = svc.sysobj->init_obj_ctx();
 
-  r = get_bucket_info(sysobj_ctx, bucket_info.bucket.tenant, bucket_info.swift_ver_location, dest_bucket_info, NULL, NULL);
+  r = get_bucket_info(sysobj_ctx, bucket_info.bucket.tenant, bucket_info.swift_ver_location, dest_bucket_info, NULL, null_yield, NULL);
   if (r < 0) {
     ldout(cct, 10) << "failed to read dest bucket info: r=" << r << dendl;
     if (r == -ENOENT) {
@@ -3442,7 +3442,7 @@ int RGWRados::swift_versioning_restore(RGWSysObjectCtx& sysobj_ctx,
 
   int ret = get_bucket_info(sysobj_ctx, bucket_info.bucket.tenant,
                             bucket_info.swift_ver_location, archive_binfo,
-                            nullptr, nullptr);
+                            nullptr, null_yield, nullptr);
   if (ret < 0) {
     return ret;
   }
@@ -5050,7 +5050,7 @@ int RGWRados::set_bucket_owner(rgw_bucket& bucket, ACLOwner& owner)
   auto obj_ctx = svc.sysobj->init_obj_ctx();
   int r;
   if (bucket.bucket_id.empty()) {
-    r = get_bucket_info(obj_ctx, bucket.tenant, bucket.name, info, NULL, &attrs);
+    r = get_bucket_info(obj_ctx, bucket.tenant, bucket.name, info, NULL, null_yield, &attrs);
   } else {
     r = get_bucket_instance_info(obj_ctx, bucket, info, nullptr, &attrs);
   }
@@ -5087,7 +5087,7 @@ int RGWRados::set_buckets_enabled(vector<rgw_bucket>& buckets, bool enabled)
     RGWBucketInfo info;
     map<string, bufferlist> attrs;
     auto obj_ctx = svc.sysobj->init_obj_ctx();
-    int r = get_bucket_info(obj_ctx, bucket.tenant, bucket.name, info, NULL, &attrs);
+    int r = get_bucket_info(obj_ctx, bucket.tenant, bucket.name, info, NULL, null_yield, &attrs);
     if (r < 0) {
       ldout(cct, 0) << "NOTICE: get_bucket_info on bucket=" << bucket.name << " returned err=" << r << ", skipping bucket" << dendl;
       ret = r;
@@ -5113,7 +5113,7 @@ int RGWRados::bucket_suspended(rgw_bucket& bucket, bool *suspended)
 {
   RGWBucketInfo bucket_info;
   auto obj_ctx = svc.sysobj->init_obj_ctx();
-  int ret = get_bucket_info(obj_ctx, bucket.tenant, bucket.name, bucket_info, NULL);
+  int ret = get_bucket_info(obj_ctx, bucket.tenant, bucket.name, bucket_info, NULL, null_yield);
   if (ret < 0) {
     return ret;
   }
@@ -8341,7 +8341,8 @@ int RGWRados::_get_bucket_info(RGWSysObjectCtx& obj_ctx,
 int RGWRados::get_bucket_info(RGWSysObjectCtx& obj_ctx,
                               const string& tenant, const string& bucket_name,
                               RGWBucketInfo& info,
-                              real_time *pmtime, map<string, bufferlist> *pattrs)
+                              real_time *pmtime,
+                              optional_yield y, map<string, bufferlist> *pattrs)
 {
   return _get_bucket_info(obj_ctx, tenant, bucket_name, info, pmtime,
                           pattrs, boost::none);
index 6c948b1d8144c25fca0a0d56bd3a8b6d90382d64..09704da8301e74962ce4fc6e6467555279fd1186 100644 (file)
@@ -2182,7 +2182,7 @@ public:
   int get_bucket_info(RGWSysObjectCtx& obj_ctx,
                      const string& tenant_name, const string& bucket_name,
                      RGWBucketInfo& info,
-                     ceph::real_time *pmtime, map<string, bufferlist> *pattrs = NULL);
+                     ceph::real_time *pmtime, optional_yield y, map<string, bufferlist> *pattrs = NULL);
 
   // Returns 0 on successful refresh. Returns error code if there was
   // an error or the version stored on the OSD is the same as that
index 53660c0d3c159fb19834856f690edc3cee01da2f..bb6e1862b926c6f26a7ea18bcf25526106b67139 100644 (file)
@@ -1007,7 +1007,7 @@ int RGWReshard::process_single_logshard(int logshard_num)
        map<string, bufferlist> attrs;
 
        ret = store->get_bucket_info(obj_ctx, entry.tenant, entry.bucket_name,
-                                    bucket_info, nullptr, &attrs);
+                                    bucket_info, nullptr, null_yield, &attrs);
        if (ret < 0) {
          ldout(cct, 0) <<  __func__ << ": Error in get_bucket_info: " <<
            cpp_strerror(-ret) << dendl;
index 857d0c9df07e5e6373d74cdebc689bd9a5212aec..669550f1d5c421ea89f9387f0f5af3924ed7b4c5 100644 (file)
@@ -265,7 +265,7 @@ void RGWOp_Set_Bucket_Quota::execute()
     RGWBucketInfo bucket_info;
     map<string, bufferlist> attrs;
     auto obj_ctx = store->svc.sysobj->init_obj_ctx();
-    http_ret = store->get_bucket_info(obj_ctx, uid.tenant, bucket, bucket_info, NULL, &attrs);
+    http_ret = store->get_bucket_info(obj_ctx, uid.tenant, bucket, bucket_info, NULL, s->yield, &attrs);
     if (http_ret < 0) {
       return;
     }
index 6daeca16dfeeb236f1194ee8d29af4fe796635cb..ae44aff815a1c896221c1494f38196bceb2d8d30 100644 (file)
@@ -398,7 +398,7 @@ void RGWOp_BILog_List::execute() {
       return;
     }
   } else { /* !bucket_name.empty() */
-    http_ret = store->get_bucket_info(*s->sysobj_ctx, tenant_name, bucket_name, bucket_info, NULL, NULL);
+    http_ret = store->get_bucket_info(*s->sysobj_ctx, tenant_name, bucket_name, bucket_info, NULL, null_yield, NULL);
     if (http_ret < 0) {
       dout(5) << "could not get bucket info for bucket=" << bucket_name << dendl;
       return;
@@ -489,7 +489,7 @@ void RGWOp_BILog_Info::execute() {
       return;
     }
   } else { /* !bucket_name.empty() */
-    http_ret = store->get_bucket_info(*s->sysobj_ctx, tenant_name, bucket_name, bucket_info, NULL, NULL);
+    http_ret = store->get_bucket_info(*s->sysobj_ctx, tenant_name, bucket_name, bucket_info, NULL, null_yield, NULL);
     if (http_ret < 0) {
       dout(5) << "could not get bucket info for bucket=" << bucket_name << dendl;
       return;
@@ -551,7 +551,7 @@ void RGWOp_BILog_Delete::execute() {
       return;
     }
   } else { /* !bucket_name.empty() */
-    http_ret = store->get_bucket_info(*s->sysobj_ctx, tenant_name, bucket_name, bucket_info, NULL, NULL);
+    http_ret = store->get_bucket_info(*s->sysobj_ctx, tenant_name, bucket_name, bucket_info, NULL, null_yield, NULL);
     if (http_ret < 0) {
       dout(5) << "could not get bucket info for bucket=" << bucket_name << dendl;
       return;
index acb7b308fa63354829224fa5a31c8a83a96324d3..32ae0362bde5e4dbdb40494cb4e252ca0c710111 100644 (file)
@@ -1397,7 +1397,7 @@ int RGWPutObj_ObjStore_S3::get_params()
                                  copy_source_tenant_name,
                                  copy_source_bucket_name,
                                  copy_source_bucket_info,
-                                 NULL, &src_attrs);
+                                 NULL, s->yield, &src_attrs);
     if (ret < 0) {
       ldpp_dout(this, 5) << __func__ << "(): get_bucket_info() returned ret=" << ret << dendl;
       return ret;
@@ -3671,7 +3671,7 @@ int RGWHandler_REST_S3Website::retarget(RGWOp* op, RGWOp** new_op) {
 
   int ret = store->get_bucket_info(*s->sysobj_ctx, s->bucket_tenant,
                                  s->bucket_name, s->bucket_info, NULL,
-                                 &s->bucket_attrs);
+                                 s->yield, &s->bucket_attrs);
   if (ret < 0) {
       // TODO-FUTURE: if the bucket does not exist, maybe expose it here?
       return -ERR_NO_SUCH_BUCKET;
index 00ce5cdc7776e537fac5678afd61a37b36195923..5e60f83149582cec5ff3b0952c3e4721b12bac6c 100644 (file)
@@ -851,7 +851,7 @@ int RGWPutObj_ObjStore_SWIFT::update_slo_segment_size(rgw_slo_entry& entry) {
     auto obj_ctx = store->svc.sysobj->init_obj_ctx();
     r = store->get_bucket_info(obj_ctx, s->user->user_id.tenant,
                               bucket_name, bucket_info, nullptr,
-                              &bucket_attrs);
+                              s->yield, &bucket_attrs);
     if (r < 0) {
       ldpp_dout(this, 0) << "could not get bucket info for bucket="
                         << bucket_name << dendl;
@@ -2109,7 +2109,7 @@ void RGWFormPost::get_owner_info(const req_state* const s,
   RGWBucketInfo bucket_info;
   int ret = store->get_bucket_info(*s->sysobj_ctx,
                                    bucket_tenant, bucket_name,
-                                   bucket_info, nullptr);
+                                   bucket_info, nullptr, s->yield);
   if (ret < 0) {
     throw ret;
   }
index a8c911e9103e635097e0f34e6a75f24d7e42cfa9..ad810252c1ba9fccf11aa03aaad0f2f96a66bd65 100644 (file)
@@ -108,7 +108,7 @@ void TempURLEngine::get_owner_info(const DoutPrefixProvider* dpp, const req_stat
   RGWBucketInfo bucket_info;
   int ret = store->get_bucket_info(*s->sysobj_ctx,
                                    bucket_tenant, bucket_name,
-                                   bucket_info, nullptr);
+                                   bucket_info, nullptr, null_yield);
   if (ret < 0) {
     throw ret;
   }
index 3419e358170f57fb6e0a664d9b1beb41b65f0bbb..447171d4aeb3140d1d7222ac08462dc93213bdcc 100644 (file)
@@ -700,7 +700,7 @@ public:
     const auto& id = s->owner.get_id();
 
     ret = store->get_bucket_info(*s->sysobj_ctx, id.tenant, bucket_name,
-                                 bucket_info, nullptr, nullptr);
+                                 bucket_info, nullptr, null_yield, nullptr);
     if (ret < 0) {
       ldout(s->cct, 1) << "failed to get bucket info, cannot verify ownership" << dendl;
       return ret;
@@ -963,7 +963,7 @@ public:
     }
 
     ret = store->get_bucket_info(*s->sysobj_ctx, s->owner.get_id().tenant, bucket_name,
-                                 bucket_info, nullptr, nullptr);
+                                 bucket_info, nullptr, null_yield, nullptr);
     if (ret < 0) {
       return ret;
     }
@@ -1123,7 +1123,7 @@ public:
     }
 
     ret = store->get_bucket_info(*s->sysobj_ctx, s->owner.get_id().tenant, bucket_name,
-                                 bucket_info, nullptr, nullptr);
+                                 bucket_info, nullptr, null_yield, nullptr);
     if (ret < 0) {
       return ret;
     }
index 008d0986794cb1e6a4728da99ec8ef3b3eb8c439..52dc10fad44b2d8992eb944b5576a74f19e56059 100644 (file)
@@ -394,6 +394,7 @@ int RGWDataAccess::Bucket::init()
                                       tenant, name,
                                       bucket_info,
                                       &mtime,
+                                       null_yield,
                                       &attrs);
   if (ret < 0) {
     return ret;
index 0eb06ce7578693717fb2ba037f42274fb2fc0238..7847f60eea5d2cca77f4aec20d69f9a146762bc1 100644 (file)
@@ -73,7 +73,7 @@ int rgw_user_sync_all_stats(RGWRados *store, const rgw_user& user_id)
       RGWBucketInfo bucket_info;
 
       ret = store->get_bucket_info(obj_ctx, user_id.tenant, bucket_ent.bucket.name,
-                                   bucket_info, nullptr, nullptr);
+                                   bucket_info, nullptr, null_yield, nullptr);
       if (ret < 0) {
         ldout(cct, 0) << "ERROR: could not read bucket info: bucket=" << bucket_ent.bucket << " ret=" << ret << dendl;
         continue;