]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Dpp addition to create bucket log 39204/head
authorroot <root@localhost.localdomain>
Wed, 13 Jan 2021 07:19:08 +0000 (12:49 +0530)
committerroot <root@localhost.localdomain>
Sun, 7 Feb 2021 15:16:49 +0000 (20:46 +0530)
This commit adds dpp to the create bucket log.

Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
43 files changed:
src/rgw/librgw.cc
src/rgw/rgw_acl_s3.cc
src/rgw/rgw_acl_swift.cc
src/rgw/rgw_admin.cc
src/rgw/rgw_bucket.cc
src/rgw/rgw_cr_rados.cc
src/rgw/rgw_cr_tools.cc
src/rgw/rgw_data_sync.cc
src/rgw/rgw_datalog.cc
src/rgw/rgw_file.cc
src/rgw/rgw_file.h
src/rgw/rgw_lib.h
src/rgw/rgw_multi.cc
src/rgw/rgw_object_expirer_core.cc
src/rgw/rgw_oidc_provider.cc
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_orphan.cc
src/rgw/rgw_pubsub.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_reshard.cc
src/rgw/rgw_rest_metadata.cc
src/rgw/rgw_rest_oidc_provider.cc
src/rgw/rgw_rest_pubsub_common.cc
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_sts.cc
src/rgw/rgw_rest_user.cc
src/rgw/rgw_rest_user_policy.cc
src/rgw/rgw_role.cc
src/rgw/rgw_sal_rados.cc
src/rgw/rgw_service.cc
src/rgw/rgw_sts.cc
src/rgw/rgw_sync.cc
src/rgw/rgw_trim_bilog.cc
src/rgw/rgw_user.cc
src/rgw/rgw_zone.cc
src/rgw/services/svc_bi_rados.cc
src/rgw/services/svc_bucket_sobj.cc
src/rgw/services/svc_bucket_sync_sobj.cc
src/rgw/services/svc_mdlog.cc
src/rgw/services/svc_sync_modules.cc
src/rgw/services/svc_user_rados.cc
src/rgw/services/svc_zone.cc

index 482fb65bcd98a1d270a90b3ec0228b88f988a7a1..82f985712c563b6d7bc7317571e8dbd4c7e2623a 100644 (file)
@@ -206,7 +206,7 @@ namespace rgw {
      */
     RGWOp *op = (req->op) ? req->op : dynamic_cast<RGWOp*>(req);
     if (! op) {
-      dout(1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
+      ldpp_dout(op, 1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
       return -EINVAL;
     }
 
@@ -242,7 +242,7 @@ namespace rgw {
     /* XXX and -then- stash req_state pointers everywhere they are needed */
     ret = req->init(rgw_env, &rados_ctx, io, s);
     if (ret < 0) {
-      dout(10) << "failed to initialize request" << dendl;
+      ldpp_dout(op, 10) << "failed to initialize request" << dendl;
       abort_req(s, op, ret);
       goto done;
     }
@@ -302,9 +302,9 @@ namespace rgw {
       ret = op->verify_permission(null_yield);
       if (ret < 0) {
        if (s->system_request) {
-         dout(2) << "overriding permissions due to system operation" << dendl;
+         ldpp_dout(op, 2) << "overriding permissions due to system operation" << dendl;
        } else if (s->auth.identity->is_admin_of(s->user->get_id())) {
-         dout(2) << "overriding permissions due to admin operation" << dendl;
+         ldpp_dout(op, 2) << "overriding permissions due to admin operation" << dendl;
        } else {
          abort_req(s, op, ret);
          goto done;
@@ -344,7 +344,7 @@ namespace rgw {
 
     ldpp_dout(s, 2) << "http status=" << http_ret << dendl;
 
-    dout(1) << "====== " << __func__
+    ldpp_dout(op, 1) << "====== " << __func__
            << " req done req=" << hex << req << dec << " http_status="
            << http_ret
            << " ======" << dendl;
@@ -367,7 +367,7 @@ namespace rgw {
      */
     RGWOp *op = (req->op) ? req->op : dynamic_cast<RGWOp*>(req);
     if (! op) {
-      dout(1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
+      ldpp_dout(op, 1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
       return -EINVAL;
     }
 
@@ -380,7 +380,7 @@ namespace rgw {
 
     int ret = req->init(rgw_env, &rados_ctx, &io_ctx, s);
     if (ret < 0) {
-      dout(10) << "failed to initialize request" << dendl;
+      ldpp_dout(op, 10) << "failed to initialize request" << dendl;
       abort_req(s, op, ret);
       goto done;
     }
@@ -434,9 +434,9 @@ namespace rgw {
     ret = op->verify_permission(null_yield);
     if (ret < 0) {
       if (s->system_request) {
-       dout(2) << "overriding permissions due to system operation" << dendl;
+       ldpp_dout(op, 2) << "overriding permissions due to system operation" << dendl;
       } else if (s->auth.identity->is_admin_of(s->user->get_id())) {
-       dout(2) << "overriding permissions due to admin operation" << dendl;
+       ldpp_dout(op, 2) << "overriding permissions due to admin operation" << dendl;
       } else {
        abort_req(s, op, ret);
        goto done;
@@ -465,7 +465,7 @@ namespace rgw {
       return -EINVAL;
     }
 
-    int ret = req->exec_finish(op);
+    int ret = req->exec_finish();
     int op_ret = op->get_ret();
 
     ldpp_dout(op, 1) << "====== " << __func__
index 2fb275364bec0d8aab8e4c55c153362d5a4c75e8..ed91f812509b19964d966cab39bbc6cbd4ce10ff 100644 (file)
@@ -497,8 +497,8 @@ int RGWAccessControlPolicy_S3::rebuild(const DoutPrefixProvider *dpp, RGWUserCtl
   dest_owner.set_id(owner->get_id());
   dest_owner.set_name(owner_info.display_name);
 
-  ldout(cct, 20) << "owner id=" << owner->get_id() << dendl;
-  ldout(cct, 20) << "dest owner id=" << dest.get_owner().get_id() << dendl;
+  ldpp_dout(dpp, 20) << "owner id=" << owner->get_id() << dendl;
+  ldpp_dout(dpp, 20) << "dest owner id=" << dest.get_owner().get_id() << dendl;
 
   RGWAccessControlList& dst_acl = dest.get_acl();
 
@@ -517,7 +517,7 @@ int RGWAccessControlPolicy_S3::rebuild(const DoutPrefixProvider *dpp, RGWUserCtl
         string email;
         rgw_user u;
         if (!src_grant.get_id(u)) {
-          ldout(cct, 0) << "ERROR: src_grant.get_id() failed" << dendl;
+          ldpp_dout(dpp, 0) << "ERROR: src_grant.get_id() failed" << dendl;
           return -EINVAL;
         }
         email = u.id;
@@ -533,7 +533,7 @@ int RGWAccessControlPolicy_S3::rebuild(const DoutPrefixProvider *dpp, RGWUserCtl
       {
         if (type.get_type() == ACL_TYPE_CANON_USER) {
           if (!src_grant.get_id(uid)) {
-            ldout(cct, 0) << "ERROR: src_grant.get_id() failed" << dendl;
+            ldpp_dout(dpp, 0) << "ERROR: src_grant.get_id() failed" << dendl;
             err_msg = "Invalid id";
             return -EINVAL;
           }
@@ -549,7 +549,7 @@ int RGWAccessControlPolicy_S3::rebuild(const DoutPrefixProvider *dpp, RGWUserCtl
           grant_ok = true;
           rgw_user new_id;
           new_grant.get_id(new_id);
-          ldout(cct, 10) << "new grant: " << new_id << ":" << grant_user.display_name << dendl;
+          ldpp_dout(dpp, 10) << "new grant: " << new_id << ":" << grant_user.display_name << dendl;
         }
       }
       break;
@@ -559,9 +559,9 @@ int RGWAccessControlPolicy_S3::rebuild(const DoutPrefixProvider *dpp, RGWUserCtl
         if (ACLGrant_S3::group_to_uri(src_grant.get_group(), uri)) {
           new_grant = src_grant;
           grant_ok = true;
-          ldout(cct, 10) << "new grant: " << uri << dendl;
+          ldpp_dout(dpp, 10) << "new grant: " << uri << dendl;
         } else {
-          ldout(cct, 10) << "bad grant group:" << (int)src_grant.get_group() << dendl;
+          ldpp_dout(dpp, 10) << "bad grant group:" << (int)src_grant.get_group() << dendl;
           err_msg = "Invalid group uri";
           return -EINVAL;
         }
index 566f39cd22cec51cee535cad1b078af267332060..896a38bf9fbfbac3dbff7448275914a80ca7ec71 100644 (file)
@@ -139,7 +139,7 @@ int RGWAccessControlPolicy_SWIFT::add_grants(const DoutPrefixProvider *dpp,
 {
   for (const auto& uid : uids) {
     boost::optional<ACLGrant> grant;
-    ldout(cct, 20) << "trying to add grant for ACL uid=" << uid << dendl;
+    ldpp_dout(dpp, 20) << "trying to add grant for ACL uid=" << uid << dendl;
 
     /* Let's check whether the item has a separator potentially indicating
      * a special meaning (like an HTTP referral-based grant). */
@@ -192,7 +192,7 @@ int RGWAccessControlPolicy_SWIFT::create(const DoutPrefixProvider *dpp,
     std::vector<std::string> uids;
     int r = parse_list(read_list, uids);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: parse_list for read returned r="
+      ldpp_dout(dpp, 0) << "ERROR: parse_list for read returned r="
                     << r << dendl;
       return r;
     }
@@ -209,7 +209,7 @@ int RGWAccessControlPolicy_SWIFT::create(const DoutPrefixProvider *dpp,
     std::vector<std::string> uids;
     int r = parse_list(write_list, uids);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: parse_list for write returned r="
+      ldpp_dout(dpp, 0) << "ERROR: parse_list for write returned r="
                     << r << dendl;
       return r;
     }
@@ -341,7 +341,7 @@ bool RGWAccessControlPolicy_SWIFTAcct::create(const DoutPrefixProvider *dpp,
   JSONParser parser;
 
   if (!parser.parse(acl_str.c_str(), acl_str.length())) {
-    ldout(cct, 0) << "ERROR: JSONParser::parse returned error=" << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: JSONParser::parse returned error=" << dendl;
     return false;
   }
 
index 5c833b6b21a706a56619f91e5bbc24e517970675..43d06123cbf07c2c41f02719c7b3fb9fd58dc8d4 100644 (file)
@@ -1373,7 +1373,7 @@ int check_min_obj_stripe_size(rgw::sal::RGWRadosStore *store, RGWBucketInfo& buc
     auto biter = bl.cbegin();
     decode(manifest, biter);
   } catch (buffer::error& err) {
-    ldout(store->ctx(), 0) << "ERROR: failed to decode manifest" << dendl;
+    ldpp_dout(dpp(), 0) << "ERROR: failed to decode manifest" << dendl;
     return -EIO;
   }
 
@@ -2363,7 +2363,7 @@ static void get_hint_entities(const std::set<rgw_zone_id>& zones, const std::set
       rgw_bucket hint_bucket;
       int ret = init_bucket(b, hint_bucket_info, hint_bucket);
       if (ret < 0) {
-       ldout(store->ctx(), 20) << "could not init bucket info for hint bucket=" << b << " ... skipping" << dendl;
+       ldpp_dout(dpp(), 20) << "could not init bucket info for hint bucket=" << b << " ... skipping" << dendl;
        continue;
       }
 
@@ -2469,7 +2469,7 @@ static int sync_info(std::optional<rgw_zone_id> opt_target_zone, std::optional<r
     RGWBucketSyncPolicyHandlerRef hint_bucket_handler;
     int r = store->ctl()->bucket->get_sync_policy_handler(zid, hint_bucket, &hint_bucket_handler, null_yield, dpp());
     if (r < 0) {
-      ldout(store->ctx(), 20) << "could not get bucket sync policy handler for hint bucket=" << hint_bucket << " ... skipping" << dendl;
+      ldpp_dout(dpp(), 20) << "could not get bucket sync policy handler for hint bucket=" << hint_bucket << " ... skipping" << dendl;
       continue;
     }
 
@@ -2765,7 +2765,7 @@ static int scan_totp(CephContext *cct, ceph::real_time& now, rados::cls::otp::ot
                                pins[1].c_str());
       if (rc != OATH_INVALID_OTP) {
         *pofs = time_ofs - step_size + step_size * totp.window / 2;
-        ldout(cct, 20) << "found at time=" << start_time - time_ofs << " time_ofs=" << time_ofs << dendl;
+        ldpp_dout(dpp(), 20) << "found at time=" << start_time - time_ofs << " time_ofs=" << time_ofs << dendl;
         return 0;
       }
     }
@@ -6735,7 +6735,7 @@ next:
     if (min_rewrite_stripe_size > 0) {
       ret = check_min_obj_stripe_size(store, bucket_info, &obj, min_rewrite_stripe_size, &need_rewrite);
       if (ret < 0) {
-        ldout(store->ctx(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << ret << dendl;
+        ldpp_dout(dpp(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << ret << dendl;
       }
     }
     if (need_rewrite) {
@@ -6745,7 +6745,7 @@ next:
         return -ret;
       }
     } else {
-      ldout(store->ctx(), 20) << "skipped object" << dendl;
+      ldpp_dout(dpp(), 20) << "skipped object" << dendl;
     }
   }
 
@@ -6864,7 +6864,7 @@ next:
           if (min_rewrite_stripe_size > 0) {
             r = check_min_obj_stripe_size(store, bucket_info, &obj, min_rewrite_stripe_size, &need_rewrite);
             if (r < 0) {
-              ldout(store->ctx(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << r << dendl;
+              ldpp_dout(dpp(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << r << dendl;
             }
           }
           if (!need_rewrite) {
index 94bd6dd685479ef9b0640d8a8f7183bfc86b969b..1ebda084be11ee46cdbed243037d91c53ff16c7d 100644 (file)
@@ -421,7 +421,7 @@ int rgw_remove_bucket_bypass_gc(rgw::sal::RGWRadosStore *store, rgw_bucket& buck
         continue;
       }
       if (ret < 0) {
-        lderr(store->ctx()) << "ERROR: get obj state returned with error " << ret << dendl;
+        ldpp_dout(dpp, -1) << "ERROR: get obj state returned with error " << ret << dendl;
         return ret;
       }
 
@@ -636,7 +636,7 @@ int RGWBucket::link(RGWBucketAdminOpState& op_state, optional_yield y, const Dou
   map<string, bufferlist>::iterator aiter = attrs.find(RGW_ATTR_ACL);
   if (aiter == attrs.end()) {
        // should never happen; only pre-argonaut buckets lacked this.
-    ldout(store->ctx(), 0) << "WARNING: can't bucket link because no acl on bucket=" << old_bucket.name << dendl;
+    ldpp_dout(dpp, 0) << "WARNING: can't bucket link because no acl on bucket=" << old_bucket.name << dendl;
     set_err_msg(err_msg,
        "While crossing the Anavros you have displeased the goddess Hera."
        "  You must sacrifice your ancient bucket " + bucket.bucket_id);
@@ -663,7 +663,7 @@ int RGWBucket::link(RGWBucketAdminOpState& op_state, optional_yield y, const Dou
 
   // now update the user for the bucket...
   if (display_name.empty()) {
-    ldout(store->ctx(), 0) << "WARNING: user " << user_info.user_id << " has no display name set" << dendl;
+    ldpp_dout(dpp, 0) << "WARNING: user " << user_info.user_id << " has no display name set" << dendl;
   }
 
   RGWAccessControlPolicy policy_instance;
@@ -1681,7 +1681,7 @@ void get_stale_instances(rgw::sal::RGWRadosStore *store, const std::string& buck
                              std::make_move_iterator(other_instances.end()));
     } else {
       // all bets are off if we can't read the bucket, just return the sureshot stale instances
-      lderr(store->ctx()) << "error: reading bucket info for bucket: "
+      ldpp_dout(dpp, -1) << "error: reading bucket info for bucket: "
                           << bucket << cpp_strerror(-r) << dendl;
     }
     return;
@@ -1943,7 +1943,7 @@ static int fix_bucket_obj_expiry(const DoutPrefixProvider *dpp,
                                 RGWFormatterFlusher& flusher, bool dry_run)
 {
   if (bucket_info.bucket.bucket_id == bucket_info.bucket.marker) {
-    lderr(store->ctx()) << "Not a resharded bucket skipping" << dendl;
+    ldpp_dout(dpp, -1) << "Not a resharded bucket skipping" << dendl;
     return 0;  // not a resharded bucket, move along
   }
 
@@ -2266,7 +2266,7 @@ public:
 
     RGWSI_Bucket_EP_Ctx ctx(op->ctx());
 
-    ldout(cct, 5) << "SKIP: bucket removal is not allowed on archive zone: bucket:" << entry << " ... proceeding to rename" << dendl;
+    ldpp_dout(dpp, 5) << "SKIP: bucket removal is not allowed on archive zone: bucket:" << entry << " ... proceeding to rename" << dendl;
 
     string tenant_name, bucket_name;
     parse_bucket(entry, &tenant_name, &bucket_name);
@@ -2335,7 +2335,7 @@ public:
                                                                     .set_attrs(&attrs_m)
                                                                     .set_orig_info(&old_bi));
     if (ret < 0) {
-      ldout(cct, 0) << "ERROR: failed to put new bucket instance info for bucket=" << new_bi.bucket << " ret=" << ret << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to put new bucket instance info for bucket=" << new_bi.bucket << " ret=" << ret << dendl;
       return ret;
     }
 
@@ -2976,7 +2976,7 @@ int RGWBucketCtl::convert_old_bucket_info(RGWSI_Bucket_X_Ctx& ctx,
   RGWBucketInfo info;
   auto cct = svc.bucket->ctx();
 
-  ldout(cct, 10) << "RGWRados::convert_old_bucket_info(): bucket=" << bucket << dendl;
+  ldpp_dout(dpp, 10) << "RGWRados::convert_old_bucket_info(): bucket=" << bucket << dendl;
 
   int ret = svc.bucket->read_bucket_entrypoint_info(ctx.ep,
                                                     RGWSI_Bucket::get_entrypoint_meta_key(bucket),
@@ -3132,7 +3132,7 @@ int RGWBucketCtl::do_unlink_bucket(RGWSI_Bucket_EP_Ctx& ctx,
 {
   int ret = ctl.user->remove_bucket(user_id, bucket, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: error removing bucket from directory: "
+    ldpp_dout(dpp, 0) << "ERROR: error removing bucket from directory: "
         << cpp_strerror(-ret)<< dendl;
   }
 
@@ -3153,7 +3153,7 @@ int RGWBucketCtl::do_unlink_bucket(RGWSI_Bucket_EP_Ctx& ctx,
     return 0;
 
   if (ep.owner != user_id) {
-    ldout(cct, 0) << "bucket entry point user mismatch, can't unlink bucket: " << ep.owner << " != " << user_id << dendl;
+    ldpp_dout(dpp, 0) << "bucket entry point user mismatch, can't unlink bucket: " << ep.owner << " != " << user_id << dendl;
     return -EINVAL;
   }
 
@@ -3228,7 +3228,7 @@ int RGWBucketCtl::chown(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_in
       }
       const auto& aiter = attrs.find(RGW_ATTR_ACL);
       if (aiter == attrs.end()) {
-        ldout(store->ctx(), 0) << "ERROR: no acls found for object " << obj.key.name << " .Continuing with next object." << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: no acls found for object " << obj.key.name << " .Continuing with next object." << dendl;
         continue;
       } else {
         bufferlist& bl = aiter->second;
@@ -3238,7 +3238,7 @@ int RGWBucketCtl::chown(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_in
           decode(policy, bl);
           owner = policy.get_owner();
         } catch (buffer::error& err) {
-          ldout(store->ctx(), 0) << "ERROR: decode policy failed" << err.what()
+          ldpp_dout(dpp, 0) << "ERROR: decode policy failed" << err.what()
                                 << dendl;
           return -EIO;
         }
index ee6e962ef3dda78df1e078cae40b5229f5a97a64..73c30d60b4724a31dd48be52bc675d9618a53f82 100644 (file)
@@ -587,7 +587,7 @@ int RGWAsyncGetBucketInstanceInfo::_send_request()
                                                RGWBucketCtl::BucketInstance::GetParams().set_attrs(&attrs));
   }
   if (r < 0) {
-    ldout(store->ctx(), 0) << "ERROR: failed to get bucket instance info for "
+    ldpp_dout(dpp, 0) << "ERROR: failed to get bucket instance info for "
         << bucket << dendl;
     return r;
   }
@@ -740,13 +740,13 @@ int RGWAsyncRemoveObj::_send_request()
 
   int ret = store->getRados()->get_obj_state(dpp, &obj_ctx, bucket_info, obj, &state, null_yield);
   if (ret < 0) {
-    ldout(store->ctx(), 20) << __func__ << "(): get_obj_state() obj=" << obj << " returned ret=" << ret << dendl;
+    ldpp_dout(dpp, 20) << __func__ << "(): get_obj_state() obj=" << obj << " returned ret=" << ret << dendl;
     return ret;
   }
 
   /* has there been any racing object write? */
   if (del_if_older && (state->mtime > timestamp)) {
-    ldout(store->ctx(), 20) << __func__ << "(): skipping object removal obj=" << obj << " (obj mtime=" << state->mtime << ", request timestamp=" << timestamp << ")" << dendl;
+    ldpp_dout(dpp, 20) << __func__ << "(): skipping object removal obj=" << obj << " (obj mtime=" << state->mtime << ", request timestamp=" << timestamp << ")" << dendl;
     return 0;
   }
 
@@ -759,7 +759,7 @@ int RGWAsyncRemoveObj::_send_request()
     try {
       policy.decode(bliter);
     } catch (buffer::error& err) {
-      ldout(store->ctx(), 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
       return -EIO;
     }
   }
@@ -785,7 +785,7 @@ int RGWAsyncRemoveObj::_send_request()
 
   ret = del_op.delete_obj(null_yield, dpp);
   if (ret < 0) {
-    ldout(store->ctx(), 20) << __func__ << "(): delete_obj() obj=" << obj << " returned ret=" << ret << dendl;
+    ldpp_dout(dpp, 20) << __func__ << "(): delete_obj() obj=" << obj << " returned ret=" << ret << dendl;
   }
   return ret;
 }
index 1db4d1f3c67fa5669bc96b07a602d87a7905910d..e3b8d42aeee3423d90eb2357c6b0f044b0ebe238 100644 (file)
@@ -204,7 +204,7 @@ int RGWBucketCreateLocalCR::Request::_send_request()
 
   if (existed) {
     if (info.owner != user) {
-      ldout(cct, 20) << "NOTICE: bucket already exists under a different user (bucket=" << bucket << " user=" << user << " bucket_owner=" << info.owner << dendl;
+      ldpp_dout(dpp, 20) << "NOTICE: bucket already exists under a different user (bucket=" << bucket << " user=" << user << " bucket_owner=" << info.owner << dendl;
       return -EEXIST;
     }
     bucket = info.bucket;
@@ -215,14 +215,14 @@ int RGWBucketCreateLocalCR::Request::_send_request()
     /* if it exists (or previously existed), don't remove it! */
     int r = store->ctl()->bucket->unlink_bucket(user, bucket, null_yield, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "WARNING: failed to unlink bucket: ret=" << r << dendl;
+      ldpp_dout(dpp, 0) << "WARNING: failed to unlink bucket: ret=" << r << dendl;
     }
   } else if (ret == -EEXIST || (ret == 0 && existed)) {
     ret = -ERR_BUCKET_EXISTS;
   }
 
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: bucket creation (bucket=" << bucket << ") return ret=" << ret << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: bucket creation (bucket=" << bucket << ") return ret=" << ret << dendl;
   }
 
   return ret;
@@ -247,7 +247,7 @@ int RGWObjectSimplePutCR::Request::_send_request()
 
   ret = obj->put(params.data, params.attrs, dpp, null_yield);
   if (ret < 0) {
-    lderr(cct) << "ERROR: put object returned error: " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, -1) << "ERROR: put object returned error: " << cpp_strerror(-ret) << dendl;
   }
 
   return 0;
@@ -286,7 +286,7 @@ int RGWBucketGetSyncPolicyHandlerCR::Request::_send_request()
                                                         null_yield,
                                                         dpp);
   if (r < 0) {
-    lderr(cct) << "ERROR: " << __func__ << "(): get_sync_policy_handler() returned " << r << dendl;
+    ldpp_dout(dpp, -1) << "ERROR: " << __func__ << "(): get_sync_policy_handler() returned " << r << dendl;
     return  r;
   }
 
index 67a8252e760246fd7ecdfd83c82b3a1d3b25edbd..10dfc07ef90f0b2653280cb6088010a71099617a 100644 (file)
@@ -2518,7 +2518,7 @@ RGWCoroutine *RGWArchiveDataSyncModule::sync_object(RGWDataSyncCtx *sc, rgw_buck
       sync_pipe.dest_bucket_info.flags = (sync_pipe.dest_bucket_info.flags & ~BUCKET_VERSIONS_SUSPENDED) | BUCKET_VERSIONED;
       int op_ret = sync_env->store->getRados()->put_bucket_instance_info(sync_pipe.dest_bucket_info, false, real_time(), NULL, sync_env->dpp);
       if (op_ret < 0) {
-         ldout(sc->cct, 0) << "SYNC_ARCHIVE: sync_object: error versioning archive bucket" << dendl;
+         ldpp_dout(sync_env->dpp, 0) << "SYNC_ARCHIVE: sync_object: error versioning archive bucket" << dendl;
          return NULL;
       }
   }
index 697a1b360e64a4f3121edf78c96a56b376a072a1..df723f45a99901f42e8695341ed70e311baaf644 100644 (file)
@@ -722,7 +722,7 @@ int RGWDataChangesLog::add_entry(const DoutPrefixProvider *dpp, const RGWBucketI
 
   std::unique_lock sl(status->lock);
 
-  ldout(cct, 20) << "RGWDataChangesLog::add_entry() bucket.name=" << bucket.name
+  ldpp_dout(dpp, 20) << "RGWDataChangesLog::add_entry() bucket.name=" << bucket.name
                 << " shard_id=" << shard_id << " now=" << now
                 << " cur_expiration=" << status->cur_expiration << dendl;
 
@@ -773,7 +773,7 @@ int RGWDataChangesLog::add_entry(const DoutPrefixProvider *dpp, const RGWBucketI
     change.timestamp = now;
     encode(change, bl);
 
-    ldout(cct, 20) << "RGWDataChangesLog::add_entry() sending update with now=" << now << " cur_expiration=" << expiration << dendl;
+    ldpp_dout(dpp, 20) << "RGWDataChangesLog::add_entry() sending update with now=" << now << " cur_expiration=" << expiration << dendl;
 
     ret = be->push(index, now, change.key, std::move(bl));
 
index 77c6e80072022f04b24c2aa46214a6bbaca461b9..50e0b6039614c38d79400d59f191a05d97573376 100644 (file)
@@ -1904,7 +1904,7 @@ namespace rgw {
     return op_ret;
   } /* exec_continue */
 
-  int RGWWriteRequest::exec_finish(const DoutPrefixProvider *dpp)
+  int RGWWriteRequest::exec_finish()
   {
     buffer::list bl, aclbl, ux_key, ux_attrs;
     map<string, string>::iterator iter;
@@ -1942,7 +1942,7 @@ namespace rgw {
       cs_info.blocks = std::move(compressor->get_compression_blocks());
       encode(cs_info, tmp);
       attrs[RGW_ATTR_COMPRESSION] = tmp;
-      ldout(state->cct, 20) << "storing " << RGW_ATTR_COMPRESSION
+      ldpp_dout(this, 20) << "storing " << RGW_ATTR_COMPRESSION
                        << " with type=" << cs_info.compression_type
                        << ", orig_size=" << cs_info.orig_size
                        << ", blocks=" << cs_info.blocks.size() << dendl;
@@ -1973,7 +1973,7 @@ namespace rgw {
       attrbl.append(val.c_str(), val.size() + 1);
     }
 
-    op_ret = rgw_get_request_metadata(dpp, state->cct, state->info, attrs);
+    op_ret = rgw_get_request_metadata(state->cct, state->info, attrs);
     if (op_ret < 0) {
       goto done;
     }
index baf115f3d36179886849c9107ba59cc4e17830be..60845d9d896b5c984c719e4a39fae8104690890c 100644 (file)
@@ -2579,7 +2579,7 @@ public:
 
   int exec_start() override;
   int exec_continue() override;
-  int exec_finish(const DoutPrefixProvider *dpp) override;
+  int exec_finish() override;
 
   void send_response() override {}
 
index 3f87859b6e98f5742148af464737c2fdcfa2daba..63f34cf3d7942e5d94a0b593d05664345efcd3bf 100644 (file)
@@ -222,7 +222,7 @@ namespace rgw {
     virtual int execute() final { ceph_abort(); }
     virtual int exec_start() = 0;
     virtual int exec_continue() = 0;
-    virtual int exec_finish(const DoutPrefixProvider *dpp) = 0;
+    virtual int exec_finish() = 0;
 
   }; /* RGWLibContinuedReq */
 
index 0bbf9ae4e90c6b9d610acb2166eea00187734b73..ff44766bdf6c545c6c65c762254998b6dcbbfa1f 100644 (file)
@@ -222,7 +222,7 @@ int abort_multipart_upload(const DoutPrefixProvider *dpp,
                               mp_obj.get_upload_id(), mp_obj.get_meta(),
                               1000, marker, obj_parts, &marker, &truncated);
     if (ret < 0) {
-      ldout(cct, 20) << __func__ << ": list_multipart_parts returned " <<
+      ldpp_dout(dpp, 20) << __func__ << ": list_multipart_parts returned " <<
        ret << dendl;
       return (ret == -ENOENT) ? -ERR_NO_SUCH_UPLOAD : ret;
     }
@@ -259,7 +259,7 @@ int abort_multipart_upload(const DoutPrefixProvider *dpp,
   /* use upload id as tag and do it synchronously */
   ret = store->getRados()->send_chain_to_gc(chain, mp_obj.get_upload_id());
   if (ret < 0) {
-    ldout(cct, 5) << __func__ << ": gc->send_chain() returned " << ret << dendl;
+    ldpp_dout(dpp, 5) << __func__ << ": gc->send_chain() returned " << ret << dendl;
     if (ret == -ENOENT) {
       return -ERR_NO_SUCH_UPLOAD;
     }
@@ -281,7 +281,7 @@ int abort_multipart_upload(const DoutPrefixProvider *dpp,
   // and also remove the metadata obj
   ret = del_op.delete_obj(null_yield, dpp);
   if (ret < 0) {
-    ldout(cct, 20) << __func__ << ": del_op.delete_obj returned " <<
+    ldpp_dout(dpp, 20) << __func__ << ": del_op.delete_obj returned " <<
       ret << dendl;
   }
   return (ret == -ENOENT) ? -ERR_NO_SUCH_UPLOAD : ret;
@@ -323,13 +323,13 @@ int abort_bucket_multiparts(const DoutPrefixProvider *dpp,
     ret = list_bucket_multiparts(dpp, store, bucket_info, prefix, marker, delim,
                                 max, &objs, nullptr, &is_truncated);
     if (ret < 0) {
-      ldout(store->ctx(), 0) << __func__ <<
+      ldpp_dout(dpp, 0) << __func__ <<
        " ERROR : calling list_bucket_multiparts; ret=" << ret <<
        "; bucket=\"" << bucket_info.bucket << "\"; prefix=\"" <<
        prefix << "\"; delim=\"" << delim << "\"" << dendl;
       return ret;
     }
-    ldout(store->ctx(), 20) << __func__ <<
+    ldpp_dout(dpp, 20) << __func__ <<
       " INFO: aborting and cleaning up multipart upload(s); bucket=\"" <<
       bucket_info.bucket << "\"; objs.size()=" << objs.size() <<
       "; is_truncated=" << is_truncated << dendl;
@@ -345,12 +345,12 @@ int abort_bucket_multiparts(const DoutPrefixProvider *dpp,
          // we're doing a best-effort; if something cannot be found,
          // log it and keep moving forward
          if (ret != -ENOENT && ret != -ERR_NO_SUCH_UPLOAD) {
-           ldout(store->ctx(), 0) << __func__ <<
+           ldpp_dout(dpp, 0) << __func__ <<
              " ERROR : failed to abort and clean-up multipart upload \"" <<
              key.get_oid() << "\"" << dendl;
            return ret;
          } else {
-           ldout(store->ctx(), 10) << __func__ <<
+           ldpp_dout(dpp, 10) << __func__ <<
              " NOTE : unable to find part(s) of "
              "aborted multipart upload of \"" << key.get_oid() <<
              "\" for cleaning up" << dendl;
@@ -359,7 +359,7 @@ int abort_bucket_multiparts(const DoutPrefixProvider *dpp,
         num_deleted++;
       }
       if (num_deleted) {
-        ldout(store->ctx(), 0) << __func__ <<
+        ldpp_dout(dpp, 0) << __func__ <<
          " WARNING : aborted " << num_deleted <<
          " incomplete multipart uploads" << dendl;
       }
index 0b0be8476056de3e207bf11110b11ea2d478a2a1..facfa2eac24cf3deff54fc0ddb2aa54156d34413 100644 (file)
@@ -217,11 +217,11 @@ int RGWObjectExpirer::garbage_single_object(const DoutPrefixProvider *dpp, objex
   int ret = init_bucket_info(hint.tenant, hint.bucket_name,
           hint.bucket_id, bucket_info);
   if (-ENOENT == ret) {
-    ldout(store->ctx(), 15) << "NOTICE: cannot find bucket = " \
+    ldpp_dout(dpp, 15) << "NOTICE: cannot find bucket = " \
         << hint.bucket_name << ". The object must be already removed" << dendl;
     return -ERR_PRECONDITION_FAILED;
   } else if (ret < 0) {
-    ldout(store->ctx(),  1) << "ERROR: could not init bucket = " \
+    ldpp_dout(dpp, 1) << "ERROR: could not init bucket = " \
         << hint.bucket_name << "due to ret = " << ret << dendl;
     return ret;
   }
@@ -252,12 +252,12 @@ void RGWObjectExpirer::garbage_chunk(const DoutPrefixProvider *dpp,
        ++iter)
   {
     objexp_hint_entry hint;
-    ldout(store->ctx(), 15) << "got removal hint for: " << iter->key_ts.sec() \
+    ldpp_dout(dpp, 15) << "got removal hint for: " << iter->key_ts.sec() \
         << " - " << iter->key_ext << dendl;
 
     int ret = objexp_hint_parse(store->getRados()->ctx(), *iter, &hint);
     if (ret < 0) {
-      ldout(store->ctx(), 1) << "cannot parse removal hint for " << hint.obj_key << dendl;
+      ldpp_dout(dpp, 1) << "cannot parse removal hint for " << hint.obj_key << dendl;
       continue;
     }
 
@@ -265,9 +265,9 @@ void RGWObjectExpirer::garbage_chunk(const DoutPrefixProvider *dpp,
      * We can silently ignore that and move forward. */
     ret = garbage_single_object(dpp, hint);
     if (ret == -ERR_PRECONDITION_FAILED) {
-      ldout(store->ctx(), 15) << "not actual hint for object: " << hint.obj_key << dendl;
+      ldpp_dout(dpp, 15) << "not actual hint for object: " << hint.obj_key << dendl;
     } else if (ret < 0) {
-      ldout(store->ctx(), 1) << "cannot remove expired object: " << hint.obj_key << dendl;
+      ldpp_dout(dpp, 1) << "cannot remove expired object: " << hint.obj_key << dendl;
     }
 
     need_trim = true;
@@ -321,7 +321,7 @@ bool RGWObjectExpirer::process_single_shard(const DoutPrefixProvider *dpp,
 
   int ret = l.lock_exclusive(&store->getRados()->objexp_pool_ctx, shard);
   if (ret == -EBUSY) { /* already locked by another processor */
-    dout(5) << __func__ << "(): failed to acquire lock on " << shard << dendl;
+    ldpp_dout(dpp, 5) << __func__ << "(): failed to acquire lock on " << shard << dendl;
     return false;
   }
 
@@ -334,7 +334,7 @@ bool RGWObjectExpirer::process_single_shard(const DoutPrefixProvider *dpp,
                                      num_entries, marker, entries,
                                      &out_marker, &truncated);
     if (ret < 0) {
-      ldout(cct, 10) << "cannot get removal hints from shard: " << shard
+      ldpp_dout(dpp, 10) << "cannot get removal hints from shard: " << shard
                      << dendl;
       continue;
     }
@@ -372,7 +372,7 @@ bool RGWObjectExpirer::inspect_all_shards(const DoutPrefixProvider *dpp,
     string shard;
     objexp_get_shard(i, &shard);
 
-    ldout(store->ctx(), 20) << "processing shard = " << shard << dendl;
+    ldpp_dout(dpp, 20) << "processing shard = " << shard << dendl;
 
     if (! process_single_shard(dpp, shard, last_run, round_start)) {
       all_done = false;
index 35496e14fef0f5c0f1821c7925f758fe4cb66775..0a6b5aea0eada8b1609ca9fd1dddd22b027f285a 100644 (file)
@@ -70,11 +70,11 @@ int RGWOIDCProvider::create(const DoutPrefixProvider *dpp, bool exclusive, optio
   /* check to see the name is not used */
   ret = read_url(dpp, idp_url, tenant);
   if (exclusive && ret == 0) {
-    ldout(cct, 0) << "ERROR: url " << provider_url << " already in use"
+    ldpp_dout(dpp, 0) << "ERROR: url " << provider_url << " already in use"
                     << id << dendl;
     return -EEXIST;
   } else if ( ret < 0 && ret != -ENOENT) {
-    ldout(cct, 0) << "failed reading provider url  " << provider_url << ": "
+    ldpp_dout(dpp, 0) << "failed reading provider url  " << provider_url << ": "
                   << cpp_strerror(-ret) << dendl;
     return ret;
   }
@@ -100,7 +100,7 @@ int RGWOIDCProvider::create(const DoutPrefixProvider *dpp, bool exclusive, optio
   auto& pool = svc->zone->get_zone_params().oidc_pool;
   ret = store_url(idp_url, exclusive, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR:  storing role info in pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR:  storing role info in pool: " << pool.name << ": "
                   << provider_url << ": " << cpp_strerror(-ret) << dendl;
     return ret;
   }
@@ -142,12 +142,12 @@ int RGWOIDCProvider::get(const DoutPrefixProvider *dpp)
   string url, tenant;
   auto ret = get_tenant_url_from_arn(tenant, url);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: failed to parse arn" << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to parse arn" << dendl;
     return -EINVAL;
   }
 
   if (this->tenant != tenant) {
-    ldout(cct, 0) << "ERROR: tenant in arn doesn't match that of user " << this->tenant << ", "
+    ldpp_dout(dpp, 0) << "ERROR: tenant in arn doesn't match that of user " << this->tenant << ", "
                   << tenant << ": " << dendl;
     return -EINVAL;
   }
@@ -204,7 +204,7 @@ int RGWOIDCProvider::read_url(const DoutPrefixProvider *dpp, const string& url,
     auto iter = bl.cbegin();
     decode(*this, iter);
   } catch (buffer::error& err) {
-    ldout(cct, 0) << "ERROR: failed to decode oidc provider info from pool: " << pool.name <<
+    ldpp_dout(dpp, 0) << "ERROR: failed to decode oidc provider info from pool: " << pool.name <<
                   ": " << url << dendl;
     return -EIO;
   }
@@ -260,7 +260,7 @@ int RGWOIDCProvider::get_providers(const DoutPrefixProvider *dpp, RGWRados *stor
     list<string> oids;
     int r = store->list_raw_objects(pool, prefix, 1000, ctx, oids, &is_truncated);
     if (r < 0) {
-      ldout(ctl->cct, 0) << "ERROR: listing filtered objects failed: " << pool.name << ": "
+      ldpp_dout(dpp, 0) << "ERROR: listing filtered objects failed: " << pool.name << ": "
                   << prefix << ": " << cpp_strerror(-r) << dendl;
       return r;
     }
@@ -279,7 +279,7 @@ int RGWOIDCProvider::get_providers(const DoutPrefixProvider *dpp, RGWRados *stor
         auto iter = bl.cbegin();
         decode(provider, iter);
       } catch (buffer::error& err) {
-        ldout(ctl->cct, 0) << "ERROR: failed to decode oidc provider info from pool: " << pool.name <<
+        ldpp_dout(dpp, 0) << "ERROR: failed to decode oidc provider info from pool: " << pool.name <<
                     ": " << iter << dendl;
         return -EIO;
       }
index a1862b190a2a4963b1407ab0c46521cc0c716164..8b35662ac5735e44d607ea74bef25d71d6b34f4c 100644 (file)
@@ -224,7 +224,7 @@ int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp,
     if (ret < 0)
       return ret;
   } else {
-    ldout(cct, 0) << "WARNING: couldn't find acl header for bucket, generating default" << dendl;
+    ldpp_dout(dpp, 0) << "WARNING: couldn't find acl header for bucket, generating default" << dendl;
     std::unique_ptr<rgw::sal::RGWUser> user = store->get_user(bucket_info.owner);
     /* object exists, but policy is broken */
     int r = user->load_by_id(dpp, y);
@@ -259,7 +259,7 @@ static int get_obj_policy_from_attr(const DoutPrefixProvider *dpp,
       return ret;
   } else if (ret == -ENODATA) {
     /* object exists, but policy is broken */
-    ldout(cct, 0) << "WARNING: couldn't find acl header for object, generating default" << dendl;
+    ldpp_dout(dpp, 0) << "WARNING: couldn't find acl header for object, generating default" << dendl;
     std::unique_ptr<rgw::sal::RGWUser> user = store->get_user(bucket_info.owner);
     ret = user->load_by_id(dpp, y);
     if (ret < 0)
@@ -3123,7 +3123,7 @@ void RGWCreateBucket::execute(optional_yield y)
   if (need_metadata_upload()) {
     /* It's supposed that following functions WILL NOT change any special
      * attributes (like RGW_ATTR_ACL) if they are already present in attrs. */
-    op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs, false);
+    op_ret = rgw_get_request_metadata(s->cct, s->info, attrs, false);
     if (op_ret < 0) {
       return;
     }
@@ -3217,7 +3217,7 @@ void RGWCreateBucket::execute(optional_yield y)
 
       attrs.clear();
 
-      op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs, false);
+      op_ret = rgw_get_request_metadata(s->cct, s->info, attrs, false);
       if (op_ret < 0) {
         return;
       }
@@ -4013,7 +4013,7 @@ void RGWPutObj::execute(optional_yield y)
   emplace_attr(RGW_ATTR_ETAG, std::move(bl));
 
   populate_with_generic_attrs(s, attrs);
-  op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs);
+  op_ret = rgw_get_request_metadata(s->cct, s->info, attrs);
   if (op_ret < 0) {
     return;
   }
@@ -4359,7 +4359,7 @@ int RGWPutMetadataAccount::init_processing(optional_yield y)
     attrs.emplace(RGW_ATTR_ACL, std::move(acl_bl));
   }
 
-  op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs, false);
+  op_ret = rgw_get_request_metadata(s->cct, s->info, attrs, false);
   if (op_ret < 0) {
     return op_ret;
   }
@@ -4458,7 +4458,7 @@ void RGWPutMetadataBucket::execute(optional_yield y)
     return;
   }
 
-  op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs, false);
+  op_ret = rgw_get_request_metadata(s->cct, s->info, attrs, false);
   if (op_ret < 0) {
     return;
   }
@@ -4553,7 +4553,7 @@ void RGWPutMetadataObject::execute(optional_yield y)
     return;
   }
 
-  op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs);
+  op_ret = rgw_get_request_metadata(s->cct, s->info, attrs);
   if (op_ret < 0) {
     return;
   }
@@ -5038,7 +5038,7 @@ int RGWCopyObj::init_common()
   dest_policy.encode(aclbl);
   emplace_attr(RGW_ATTR_ACL, std::move(aclbl));
 
-  op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs);
+  op_ret = rgw_get_request_metadata(s->cct, s->info, attrs);
   if (op_ret < 0) {
     return op_ret;
   }
@@ -5768,7 +5768,7 @@ void RGWInitMultipart::execute(optional_yield y)
   if (op_ret != 0)
     return;
 
-  op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs);
+  op_ret = rgw_get_request_metadata(s->cct, s->info, attrs);
   if (op_ret < 0) {
     return;
   }
index 48f27de297c91c315c4a4213b12794e395249950..252aa3dc0fe9ba3c47807004dd097ab1302ee4d2 100644 (file)
@@ -2015,8 +2015,7 @@ static inline void format_xattr(std::string &xattr)
  * On failure returns a negative error code.
  *
  */
-inline int rgw_get_request_metadata(const DoutPrefixProvider *dpp, 
-                                    CephContext* const cct,
+inline int rgw_get_request_metadata(CephContext* const cct,
                                    struct req_info& info,
                                    std::map<std::string, ceph::bufferlist>& attrs,
                                    const bool allow_empty_attrs = true)
@@ -2034,10 +2033,10 @@ inline int rgw_get_request_metadata(const DoutPrefixProvider *dpp,
     std::string& xattr = kv.second;
 
     if (blocklisted_headers.count(name) == 1) {
-      ldpp_dout(dpp, 10) << "skipping x>> " << name << dendl;
+      lsubdout(cct, rgw, 10) << "skipping x>> " << name << dendl;
       continue;
     } else if (allow_empty_attrs || !xattr.empty()) {
-      ldpp_dout(dpp, 10) << "x>> " << name << ":" << xattr << dendl;
+      lsubdout(cct, rgw, 10) << "x>> " << name << ":" << xattr << dendl;
       format_xattr(xattr);
 
       std::string attr_name(RGW_ATTR_PREFIX);
index 50574e4ac88972839f84ac56daf69506d448e437..d1b7e260808f8c02194fe0842f36982fb52c1f64 100644 (file)
@@ -496,7 +496,7 @@ int RGWOrphanSearch::build_linked_oids_for_bucket(const DoutPrefixProvider *dpp,
   int ret = rgw_bucket_parse_bucket_key(store->ctx(), bucket_instance_id,
                                         &orphan_bucket, &shard_id);
   if (ret < 0) {
-    ldout(store->ctx(),0) << __func__ << " failed to parse bucket instance: "
+    ldpp_dout(dpp, 0) << __func__ << " failed to parse bucket instance: "
                  << bucket_instance_id << " skipping" << dendl;
     return ret;
   }
@@ -509,19 +509,19 @@ int RGWOrphanSearch::build_linked_oids_for_bucket(const DoutPrefixProvider *dpp,
       /* probably raced with bucket removal */
       return 0;
     }
-    lderr(store->ctx()) << __func__ << ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" << ret << dendl;
+    ldpp_dout(dpp, -1) << __func__ << ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" << ret << dendl;
     return ret;
   }
 
   if (cur_bucket_info.bucket.bucket_id != orphan_bucket.bucket_id) {
-    ldout(store->ctx(), 0) << __func__ << ": Skipping stale bucket instance: "
+    ldpp_dout(dpp, 0) << __func__ << ": Skipping stale bucket instance: "
                            << orphan_bucket.name << ": "
                            << orphan_bucket.bucket_id << dendl;
     return 0;
   }
 
   if (cur_bucket_info.reshard_status == cls_rgw_reshard_status::IN_PROGRESS) {
-    ldout(store->ctx(), 0) << __func__ << ": reshard in progress. Skipping "
+    ldpp_dout(dpp, 0) << __func__ << ": reshard in progress. Skipping "
                            << orphan_bucket.name << ": "
                            << orphan_bucket.bucket_id << dendl;
     return 0;
@@ -534,11 +534,11 @@ int RGWOrphanSearch::build_linked_oids_for_bucket(const DoutPrefixProvider *dpp,
       /* probably raced with bucket removal */
       return 0;
     }
-    lderr(store->ctx()) << __func__ << ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" << ret << dendl;
+    ldpp_dout(dpp, -1) << __func__ << ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" << ret << dendl;
     return ret;
   }
 
-  ldout(store->ctx(), 10) << "building linked oids for bucket instance: " << bucket_instance_id << dendl;
+  ldpp_dout(dpp, 10) << "building linked oids for bucket instance: " << bucket_instance_id << dendl;
   RGWRados::Bucket target(store->getRados(), bucket_info);
   RGWRados::Bucket::List list_op(&target);
 
@@ -564,16 +564,16 @@ int RGWOrphanSearch::build_linked_oids_for_bucket(const DoutPrefixProvider *dpp,
     for (vector<rgw_bucket_dir_entry>::iterator iter = result.begin(); iter != result.end(); ++iter) {
       rgw_bucket_dir_entry& entry = *iter;
       if (entry.key.instance.empty()) {
-        ldout(store->ctx(), 20) << "obj entry: " << entry.key.name << dendl;
+        ldpp_dout(dpp, 20) << "obj entry: " << entry.key.name << dendl;
       } else {
-        ldout(store->ctx(), 20) << "obj entry: " << entry.key.name << " [" << entry.key.instance << "]" << dendl;
+        ldpp_dout(dpp, 20) << "obj entry: " << entry.key.name << " [" << entry.key.instance << "]" << dendl;
       }
 
-      ldout(store->ctx(), 20) << __func__ << ": entry.key.name=" << entry.key.name << " entry.key.instance=" << entry.key.instance << dendl;
+      ldpp_dout(dpp, 20) << __func__ << ": entry.key.name=" << entry.key.name << " entry.key.instance=" << entry.key.instance << dendl;
 
       if (!detailed_mode &&
           entry.meta.accounted_size <= (uint64_t)store->ctx()->_conf->rgw_max_chunk_size) {
-        ldout(store->ctx(),5) << __func__ << "skipping stat as the object " << entry.key.name
+        ldpp_dout(dpp, 5) << __func__ << "skipping stat as the object " << entry.key.name
                               << "fits in a head" << dendl;
         continue;
       }
@@ -627,7 +627,7 @@ int RGWOrphanSearch::build_linked_oids_index(const DoutPrefixProvider *dpp)
   map<int, list<string> > oids;
   map<int, string>::iterator iter = buckets_instance_index.find(search_stage.shard);
   for (; iter != buckets_instance_index.end(); ++iter) {
-    ldout(store->ctx(), 0) << "building linked oids index: " << iter->first << "/" << buckets_instance_index.size() << dendl;
+    ldpp_dout(dpp, 0) << "building linked oids index: " << iter->first << "/" << buckets_instance_index.size() << dendl;
     bool truncated;
 
     string oid = iter->second;
@@ -811,7 +811,7 @@ int RGWOrphanSearch::run(const DoutPrefixProvider *dpp)
   switch (search_stage.stage) {
     
     case ORPHAN_SEARCH_STAGE_INIT:
-      ldout(store->ctx(), 0) << __func__ << "(): initializing state" << dendl;
+      ldpp_dout(dpp, 0) << __func__ << "(): initializing state" << dendl;
       search_stage = RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_LSPOOL);
       r = save_state();
       if (r < 0) {
@@ -820,7 +820,7 @@ int RGWOrphanSearch::run(const DoutPrefixProvider *dpp)
       }
       // fall through
     case ORPHAN_SEARCH_STAGE_LSPOOL:
-      ldout(store->ctx(), 0) << __func__ << "(): building index of all objects in pool" << dendl;
+      ldpp_dout(dpp, 0) << __func__ << "(): building index of all objects in pool" << dendl;
       r = build_all_oids_index();
       if (r < 0) {
         lderr(store->ctx()) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
@@ -836,7 +836,7 @@ int RGWOrphanSearch::run(const DoutPrefixProvider *dpp)
       // fall through
 
     case ORPHAN_SEARCH_STAGE_LSBUCKETS:
-      ldout(store->ctx(), 0) << __func__ << "(): building index of all bucket indexes" << dendl;
+      ldpp_dout(dpp, 0) << __func__ << "(): building index of all bucket indexes" << dendl;
       r = build_buckets_instance_index();
       if (r < 0) {
         lderr(store->ctx()) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
@@ -1148,7 +1148,7 @@ int RGWRadosList::process_bucket(
   const std::string& prefix,
   const std::set<rgw_obj_key>& entries_filter)
 {
-  ldout(store->ctx(), 10) << "RGWRadosList::" << __func__ <<
+  ldpp_dout(dpp, 10) << "RGWRadosList::" << __func__ <<
     " bucket_instance_id=" << bucket_instance_id <<
     ", prefix=" << prefix <<
     ", entries_filter.size=" << entries_filter.size() << dendl;
@@ -1167,7 +1167,7 @@ int RGWRadosList::process_bucket(
       // probably raced with bucket removal
       return 0;
     }
-    lderr(store->ctx()) << __func__ <<
+    ldpp_dout(dpp, -1) << __func__ <<
       ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" <<
       ret << dendl;
     return ret;
@@ -1212,13 +1212,13 @@ int RGWRadosList::process_bucket(
       rgw_bucket_dir_entry& entry = *iter;
 
       if (entry.key.instance.empty()) {
-        ldout(store->ctx(), 20) << "obj entry: " << entry.key.name << dendl;
+        ldpp_dout(dpp, 20) << "obj entry: " << entry.key.name << dendl;
       } else {
-        ldout(store->ctx(), 20) << "obj entry: " << entry.key.name <<
+        ldpp_dout(dpp, 20) << "obj entry: " << entry.key.name <<
          " [" << entry.key.instance << "]" << dendl;
       }
 
-      ldout(store->ctx(), 20) << __func__ << ": entry.key.name=" <<
+      ldpp_dout(dpp, 20) << __func__ << ": entry.key.name=" <<
        entry.key.name << " entry.key.instance=" << entry.key.instance <<
        dendl;
 
@@ -1388,7 +1388,7 @@ int RGWRadosList::run(const DoutPrefixProvider *dpp, const std::string& start_bu
          // bucket deletion race?
          return 0;
        } if (ret < 0) {
-         lderr(store->ctx()) << "RGWRadosList::" << __func__ <<
+         ldpp_dout(dpp, -1) << "RGWRadosList::" << __func__ <<
            ": ERROR: process_bucket(); bucket_id=" <<
            bucket_id << " returned ret=" << ret << dendl;
        }
@@ -1434,7 +1434,7 @@ int RGWRadosList::run(const DoutPrefixProvider *dpp, const std::string& start_bu
     // bucket deletion race?
     return 0;
   } else if (ret < 0) {
-    lderr(store->ctx()) << "RGWRadosList::" << __func__ <<
+    ldpp_dout(dpp, -1) << "RGWRadosList::" << __func__ <<
       ": ERROR: get_bucket_info returned ret=" << ret << dendl;
     return ret;
   }
@@ -1478,12 +1478,12 @@ int RGWRadosList::do_incomplete_multipart(
                               &is_listing_truncated, null_yield);
     if (ret == -ENOENT) {
       // could bucket have been removed while this is running?
-      ldout(store->ctx(), 20) << "RGWRadosList::" << __func__ <<
+      ldpp_dout(dpp, 20) << "RGWRadosList::" << __func__ <<
        ": WARNING: call to list_objects of multipart namespace got ENOENT; "
        "assuming bucket removal race" << dendl;
       break;
     } else if (ret < 0) {
-      lderr(store->ctx()) << "RGWRadosList::" << __func__ <<
+      ldpp_dout(dpp, -1) << "RGWRadosList::" << __func__ <<
        ": ERROR: list_objects op returned ret=" << ret << dendl;
       return ret;
     }
@@ -1499,7 +1499,7 @@ int RGWRadosList::do_incomplete_multipart(
        }
        entry.obj = obj;
        uploads.push_back(entry);
-       ldout(store->ctx(), 20) << "RGWRadosList::" << __func__ <<
+       ldpp_dout(dpp, 20) << "RGWRadosList::" << __func__ <<
          " processing incomplete multipart entry " <<
          entry << dendl;
       }
index 5af3240863ac80f47fd54eba05620eb1006d09bf..33f650914c55f8747c2b3f4eef0bf4d55ce019f5 100644 (file)
@@ -847,7 +847,7 @@ int RGWPubSub::SubWithEvents<EventType>::list_events(const DoutPrefixProvider *d
   rgw_pubsub_sub_config sub_conf;
   int ret = get_conf(&sub_conf);
   if (ret < 0) {
-    ldout(store->ctx(), 1) << "ERROR: failed to read sub config: ret=" << ret << dendl;
+    ldpp_dout(dpp, 1) << "ERROR: failed to read sub config: ret=" << ret << dendl;
     return ret;
   }
 
@@ -859,7 +859,7 @@ int RGWPubSub::SubWithEvents<EventType>::list_events(const DoutPrefixProvider *d
     return 0;
   }
   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;
+    ldpp_dout(dpp, 1) << "ERROR: failed to read bucket info for events bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
     return ret;
   }
 
@@ -873,7 +873,7 @@ int RGWPubSub::SubWithEvents<EventType>::list_events(const DoutPrefixProvider *d
 
   ret = list_op.list_objects(dpp, max_events, &objs, nullptr, &list.is_truncated, null_yield);
   if (ret < 0) {
-    ldout(store->ctx(), 1) << "ERROR: failed to list bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
+    ldpp_dout(dpp, 1) << "ERROR: failed to list bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
     return ret;
   }
   if (list.is_truncated) {
@@ -887,7 +887,7 @@ int RGWPubSub::SubWithEvents<EventType>::list_events(const DoutPrefixProvider *d
     try {
       bl.decode_base64(bl64);
     } catch (buffer::error& err) {
-      ldout(store->ctx(), 1) << "ERROR: failed to event (not a valid base64)" << dendl;
+      ldpp_dout(dpp, 1) << "ERROR: failed to event (not a valid base64)" << dendl;
       continue;
     }
     EventType event;
@@ -896,7 +896,7 @@ int RGWPubSub::SubWithEvents<EventType>::list_events(const DoutPrefixProvider *d
     try {
       decode(event, iter);
     } catch (buffer::error& err) {
-      ldout(store->ctx(), 1) << "ERROR: failed to decode event" << dendl;
+      ldpp_dout(dpp, 1) << "ERROR: failed to decode event" << dendl;
       continue;
     };
 
@@ -912,7 +912,7 @@ int RGWPubSub::SubWithEvents<EventType>::remove_event(const DoutPrefixProvider *
   rgw_pubsub_sub_config sub_conf;
   int ret = get_conf(&sub_conf);
   if (ret < 0) {
-    ldout(store->ctx(), 1) << "ERROR: failed to read sub config: ret=" << ret << dendl;
+    ldpp_dout(dpp, 1) << "ERROR: failed to read sub config: ret=" << ret << dendl;
     return ret;
   }
 
@@ -920,7 +920,7 @@ int RGWPubSub::SubWithEvents<EventType>::remove_event(const DoutPrefixProvider *
   string tenant;
   ret = store->getRados()->get_bucket_info(store->svc(), 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;
+    ldpp_dout(dpp, 1) << "ERROR: failed to read bucket info for events bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
     return ret;
   }
 
@@ -939,7 +939,7 @@ int RGWPubSub::SubWithEvents<EventType>::remove_event(const DoutPrefixProvider *
 
   ret = del_op.delete_obj(null_yield, dpp);
   if (ret < 0) {
-    ldout(store->ctx(), 1) << "ERROR: failed to remove event (obj=" << obj << "): ret=" << ret << dendl;
+    ldpp_dout(dpp, 1) << "ERROR: failed to remove event (obj=" << obj << "): ret=" << ret << dendl;
   }
   return 0;
 }
index 9efc65a8fe1b70a3300db2f39b9f84b75e6202b2..9c66c3dc67251d261002589dad54267d77b8291c 100644 (file)
@@ -855,7 +855,7 @@ int RGWIndexCompletionThread::process()
                               return bs->bucket_obj.operate(&o, null_yield);
                              });
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: " << __func__ << "(): bucket index completion failed, obj=" << c->obj << " r=" << r << dendl;
+      ldpp_dout(this, 0) << "ERROR: " << __func__ << "(): bucket index completion failed, obj=" << c->obj << " r=" << r << dendl;
       /* ignoring error, can't do anything about it */
       continue;
     }
@@ -1858,7 +1858,7 @@ int RGWRados::Bucket::List::list_objects_ordered(
       rgw_obj_index_key index_key = entry.key;
       rgw_obj_key obj(index_key);
 
-      ldout(cct, 20) << "RGWRados::Bucket::List::" << __func__ <<
+      ldpp_dout(dpp, 20) << "RGWRados::Bucket::List::" << __func__ <<
        " considering entry " << entry.key << dendl;
 
       /* note that parse_raw_oid() here will not set the correct
@@ -2594,7 +2594,7 @@ int RGWRados::fix_tail_obj_locator(const DoutPrefixProvider *dpp, const RGWBucke
       get_obj_bucket_and_oid_loc(loc, oid, locator);
       ref.pool.ioctx().locator_set_key(locator);
 
-      ldout(cct, 20) << __func__ << ": key=" << key << " oid=" << oid << " locator=" << locator << dendl;
+      ldpp_dout(dpp, 20) << __func__ << ": key=" << key << " oid=" << oid << " locator=" << locator << dendl;
 
       r = ioctx.stat(oid, NULL, NULL);
       if (r != -ENOENT) {
@@ -2614,7 +2614,7 @@ int RGWRados::fix_tail_obj_locator(const DoutPrefixProvider *dpp, const RGWBucke
        /* cannot find a broken part */
        continue;
       }
-      ldout(cct, 20) << __func__ << ": found bad object part: " << loc << dendl;
+      ldpp_dout(dpp, 20) << __func__ << ": found bad object part: " << loc << dendl;
       if (need_fix) {
         *need_fix = true;
       }
@@ -2655,7 +2655,7 @@ int RGWRados::BucketShard::init(const rgw_bucket& _bucket,
     ldout(store->ctx(), 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
     return ret;
   }
-  ldout(store->ctx(), 20) << " bucket index object: " << bucket_obj.get_raw_obj() << dendl;
+  ldpp_dout(dpp, 20) << " bucket index object: " << bucket_obj.get_raw_obj() << dendl;
 
   return 0;
 }
@@ -2686,7 +2686,7 @@ int RGWRados::BucketShard::init(const rgw_bucket& _bucket,
     ldout(store->ctx(), 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
     return ret;
   }
-  ldout(store->ctx(), 20) << " bucket index oid: " << bucket_obj.get_raw_obj() << dendl;
+  ldpp_dout(dpp, 20) << " bucket index oid: " << bucket_obj.get_raw_obj() << dendl;
 
   return 0;
 }
@@ -2740,7 +2740,7 @@ int RGWRados::on_last_entry_in_listing(const DoutPrefixProvider *dpp,
   list_op.params.prefix = obj_prefix;
   list_op.params.delim = obj_delim;
 
-  ldout(cct, 20) << "iterating listing for bucket=" << bucket_info.bucket.name
+  ldpp_dout(dpp, 20) << "iterating listing for bucket=" << bucket_info.bucket.name
                  << ", obj_prefix=" << obj_prefix
                  << ", obj_delim=" << obj_delim
                  << dendl;
@@ -3010,7 +3010,7 @@ int RGWRados::Object::Write::_do_write_meta(const DoutPrefixProvider *dpp,
   rgw_obj& obj = target->get_obj();
 
   if (obj.get_oid().empty()) {
-    ldout(store->ctx(), 0) << "ERROR: " << __func__ << "(): cannot write object with empty name" << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): cannot write object with empty name" << dendl;
     return -EIO;
   }
 
@@ -4654,7 +4654,7 @@ int RGWRados::delete_bucket(RGWBucketInfo& bucket_info, RGWObjVersionTracker& ob
         (!bucket_info.bucket.bucket_id.empty() &&
          ep.bucket.bucket_id != bucket_info.bucket.bucket_id)) {
       if (r != -ENOENT) {
-        ldout(cct, 0) << "ERROR: read_bucket_entrypoint_info() bucket=" << bucket_info.bucket << " returned error: r=" << r << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: read_bucket_entrypoint_info() bucket=" << bucket_info.bucket << " returned error: r=" << r << dendl;
         /* we have no idea what caused the error, will not try to remove it */
       }
       /* 
@@ -4728,9 +4728,9 @@ int RGWRados::set_buckets_enabled(vector<rgw_bucket>& buckets, bool enabled, con
   for (iter = buckets.begin(); iter != buckets.end(); ++iter) {
     rgw_bucket& bucket = *iter;
     if (enabled)
-      ldout(cct, 20) << "enabling bucket name=" << bucket.name << dendl;
+      ldpp_dout(dpp, 20) << "enabling bucket name=" << bucket.name << dendl;
     else
-      ldout(cct, 20) << "disabling bucket name=" << bucket.name << dendl;
+      ldpp_dout(dpp, 20) << "disabling bucket name=" << bucket.name << dendl;
 
     RGWBucketInfo info;
     map<string, bufferlist> attrs;
@@ -4935,7 +4935,7 @@ int RGWRados::defer_gc(const DoutPrefixProvider *dpp, void *ctx, const RGWBucket
     return r;
 
   if (!state->is_atomic) {
-    ldout(cct, 20) << "state for obj=" << obj << " is not atomic, not deferring gc operation" << dendl;
+    ldpp_dout(dpp, 20) << "state for obj=" << obj << " is not atomic, not deferring gc operation" << dendl;
     return -EINVAL;
   }
 
@@ -4946,11 +4946,11 @@ int RGWRados::defer_gc(const DoutPrefixProvider *dpp, void *ctx, const RGWBucket
   } else if (state->obj_tag.length() > 0) {
     tag = state->obj_tag.c_str();
   } else {
-    ldout(cct, 20) << "state->obj_tag is empty, not deferring gc operation" << dendl;
+    ldpp_dout(dpp, 20) << "state->obj_tag is empty, not deferring gc operation" << dendl;
     return -EINVAL;
   }
 
-  ldout(cct, 0) << "defer chain tag=" << tag << dendl;
+  ldpp_dout(dpp, 0) << "defer chain tag=" << tag << dendl;
 
   cls_rgw_obj_chain chain;
   update_gc_chain(state->obj, *state->manifest, &chain);
@@ -5088,7 +5088,7 @@ int RGWRados::Object::Delete::delete_obj(optional_yield y, const DoutPrefixProvi
       unmod.tv_nsec = 0;
     }
 
-    ldout(store->ctx(), 10) << "If-UnModified-Since: " << params.unmod_since << " Last-Modified: " << ctime << dendl;
+    ldpp_dout(dpp, 10) << "If-UnModified-Since: " << params.unmod_since << " Last-Modified: " << ctime << dendl;
     if (ctime > unmod) {
       return -ERR_PRECONDITION_FAILED;
     }
@@ -5111,7 +5111,7 @@ int RGWRados::Object::Delete::delete_obj(optional_yield y, const DoutPrefixProvi
         auto iter = bl.cbegin();
         decode(delete_at, iter);
       } catch (buffer::error& err) {
-        ldout(store->ctx(), 0) << "ERROR: couldn't decode RGW_ATTR_DELETE_AT" << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: couldn't decode RGW_ATTR_DELETE_AT" << dendl;
        return -EIO;
       }
 
@@ -5163,7 +5163,7 @@ int RGWRados::Object::Delete::delete_obj(optional_yield y, const DoutPrefixProvi
     
     int ret = target->complete_atomic_modification();
     if (ret < 0) {
-      ldout(store->ctx(), 0) << "ERROR: complete_atomic_modification returned ret=" << ret << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: complete_atomic_modification returned ret=" << ret << dendl;
     }
     /* other than that, no need to propagate error */
   } else {
@@ -5317,7 +5317,7 @@ int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rc
   bool need_follow_olh = follow_olh && obj.key.instance.empty();
 
   RGWObjState *s = rctx->get_state(obj);
-  ldout(cct, 20) << "get_obj_state: rctx=" << (void *)rctx << " obj=" << obj << " state=" << (void *)s << " s->prefetch_data=" << s->prefetch_data << dendl;
+  ldpp_dout(dpp, 20) << "get_obj_state: rctx=" << (void *)rctx << " obj=" << obj << " state=" << (void *)s << " s->prefetch_data=" << s->prefetch_data << dendl;
   *state = s;
   if (s->has_attrs) {
     if (s->is_olh && need_follow_olh) {
@@ -5345,7 +5345,7 @@ int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rc
       s->mtime = entry.mtime;
       s->zone_short_id = entry.zone_short_id;
       s->pg_ver = entry.pg_ver;
-      ldout(cct, 20) << __func__ << "(): found obj in tombstone cache: obj=" << obj
+      ldpp_dout(dpp, 20) << __func__ << "(): found obj in tombstone cache: obj=" << obj
           << " mtime=" << s->mtime << " pgv=" << s->pg_ver << dendl;
     } else {
       s->mtime = real_time();
@@ -5380,7 +5380,7 @@ int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rc
       decode(info, p);
       s->accounted_size = info.orig_size; 
     } catch (buffer::error&) {
-      dout(0) << "ERROR: could not decode compression info for object: " << obj << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: could not decode compression info for object: " << obj << dendl;
       return -EIO;
     }
   }
@@ -5410,15 +5410,15 @@ int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rc
       if (!compressed)
         s->accounted_size = s->size;
     } catch (buffer::error& err) {
-      ldout(cct, 0) << "ERROR: couldn't decode manifest" << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: couldn't decode manifest" << dendl;
       return -EIO;
     }
-    ldout(cct, 10) << "manifest: total_size = " << s->manifest->get_obj_size() << dendl;
+    ldpp_dout(dpp, 10) << "manifest: total_size = " << s->manifest->get_obj_size() << dendl;
     if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>() && \
        s->manifest->has_explicit_objs()) {
       RGWObjManifest::obj_iterator mi;
       for (mi = s->manifest->obj_begin(); mi != s->manifest->obj_end(); ++mi) {
-        ldout(cct, 20) << "manifest: ofs=" << mi.get_ofs() << " loc=" << mi.get_location().get_raw_obj(store) << dendl;
+        ldpp_dout(dpp, 20) << "manifest: ofs=" << mi.get_ofs() << " loc=" << mi.get_location().get_raw_obj(store) << dendl;
       }
     }
 
@@ -5439,7 +5439,7 @@ int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rc
       try {
         decode(s->pg_ver, pgbl);
       } catch (buffer::error& err) {
-        ldout(cct, 0) << "ERROR: couldn't decode pg ver attr for object " << s->obj << ", non-critical error, ignoring" << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: couldn't decode pg ver attr for object " << s->obj << ", non-critical error, ignoring" << dendl;
       }
     }
   }
@@ -5451,14 +5451,14 @@ int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rc
       try {
         decode(s->zone_short_id, zbl);
       } catch (buffer::error& err) {
-        ldout(cct, 0) << "ERROR: couldn't decode zone short id attr for object " << s->obj << ", non-critical error, ignoring" << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: couldn't decode zone short id attr for object " << s->obj << ", non-critical error, ignoring" << dendl;
       }
     }
   }
   if (s->obj_tag.length())
-    ldout(cct, 20) << "get_obj_state: setting s->obj_tag to " << s->obj_tag.c_str() << dendl;
+    ldpp_dout(dpp, 20) << "get_obj_state: setting s->obj_tag to " << s->obj_tag.c_str() << dendl;
   else
-    ldout(cct, 20) << "get_obj_state: s->obj_tag was set empty" << dendl;
+    ldpp_dout(dpp, 20) << "get_obj_state: s->obj_tag was set empty" << dendl;
 
   /* an object might not be olh yet, but could have olh id tag, so we should set it anyway if
    * it exist, and not only if is_olh() returns true
@@ -5657,7 +5657,7 @@ int RGWRados::Object::prepare_atomic_modification(const DoutPrefixProvider *dpp,
                      (!state->fake_tag);
 
   if (!state->is_atomic) {
-    ldout(store->ctx(), 20) << "prepare_atomic_modification: state is not atomic. state=" << (void *)state << dendl;
+    ldpp_dout(dpp, 20) << "prepare_atomic_modification: state is not atomic. state=" << (void *)state << dendl;
 
     if (reset_obj) {
       op.create(false);
@@ -5727,7 +5727,7 @@ int RGWRados::Object::prepare_atomic_modification(const DoutPrefixProvider *dpp,
   bufferlist bl;
   bl.append(state->write_tag.c_str(), state->write_tag.size() + 1);
 
-  ldout(store->ctx(), 10) << "setting object write_tag=" << state->write_tag << dendl;
+  ldpp_dout(dpp, 10) << "setting object write_tag=" << state->write_tag << dendl;
 
   op.setxattr(RGW_ATTR_ID_TAG, bl);
   if (modify_tail) {
@@ -5810,7 +5810,7 @@ int RGWRados::set_attrs(const DoutPrefixProvider *dpp, void *ctx, const RGWBucke
 
         obj_expirer->hint_add(ts, bucket.tenant, bucket.name, bucket.bucket_id, obj_key);
       } catch (buffer::error& err) {
-       ldout(cct, 0) << "ERROR: failed to decode " RGW_ATTR_DELETE_AT << " attr" << dendl;
+       ldpp_dout(dpp, 0) << "ERROR: failed to decode " RGW_ATTR_DELETE_AT << " attr" << dendl;
       }
     }
   }
@@ -6120,7 +6120,7 @@ int RGWRados::Bucket::UpdateIndex::complete(const DoutPrefixProvider *dpp, int64
   if (acl_bl && acl_bl->length()) {
     int ret = store->decode_policy(*acl_bl, &owner);
     if (ret < 0) {
-      ldout(store->ctx(), 0) << "WARNING: could not decode policy ret=" << ret << dendl;
+      ldpp_dout(dpp, 0) << "WARNING: could not decode policy ret=" << ret << dendl;
     }
   }
   ent.meta.owner = owner.get_id().to_str();
@@ -6669,7 +6669,7 @@ int RGWRados::guard_reshard(const DoutPrefixProvider *dpp,
     if (r < 0) {
       return r;
     }
-    ldout(cct, 20) << "reshard completion identified, new_bucket_id=" << new_bucket_id << dendl;
+    ldpp_dout(dpp, 20) << "reshard completion identified, new_bucket_id=" << new_bucket_id << dendl;
     i = 0; /* resharding is finished, make sure we can retry */
 
     obj = *pobj;
@@ -6720,7 +6720,7 @@ int RGWRados::block_while_resharding(RGWRados::BucketShard *bs,
     if (ret == -ENOENT) {
       return fetch_new_bucket_id("get_bucket_resharding_failed", new_bucket_id);
     } else if (ret < 0) {
-      ldout(cct, 0) << __func__ <<
+      ldpp_dout(dpp, 0) << __func__ <<
        " ERROR: failed to get bucket resharding : " << cpp_strerror(-ret) <<
        dendl;
       return ret;
@@ -6731,7 +6731,7 @@ int RGWRados::block_while_resharding(RGWRados::BucketShard *bs,
                                 new_bucket_id);
     }
 
-    ldout(cct, 20) << "NOTICE: reshard still in progress; " <<
+    ldpp_dout(dpp, 20) << "NOTICE: reshard still in progress; " <<
       (i < num_retries ? "retrying" : "too many retries") << dendl;
 
     if (i == num_retries) {
@@ -6752,22 +6752,22 @@ int RGWRados::block_while_resharding(RGWRados::BucketShard *bs,
       RGWBucketReshardLock reshard_lock(this->store, bucket_info, true);
       ret = reshard_lock.lock();
       if (ret < 0) {
-       ldout(cct, 20) << __func__ <<
+       ldpp_dout(dpp, 20) << __func__ <<
          " INFO: failed to take reshard lock for bucket " <<
          bucket_id << "; expected if resharding underway" << dendl;
       } else {
-       ldout(cct, 10) << __func__ <<
+       ldpp_dout(dpp, 10) << __func__ <<
          " INFO: was able to take reshard lock for bucket " <<
          bucket_id << dendl;
        ret = RGWBucketReshard::clear_resharding(this->store, bucket_info);
        if (ret < 0) {
          reshard_lock.unlock();
-         ldout(cct, 0) << __func__ <<
+         ldpp_dout(dpp, 0) << __func__ <<
            " ERROR: failed to clear resharding flags for bucket " <<
            bucket_id << dendl;
        } else {
          reshard_lock.unlock();
-         ldout(cct, 5) << __func__ <<
+         ldpp_dout(dpp, 5) << __func__ <<
            " INFO: apparently successfully cleared resharding flags for "
            "bucket " << bucket_id << dendl;
          continue; // if we apparently succeed immediately test again
@@ -6777,13 +6777,13 @@ int RGWRados::block_while_resharding(RGWRados::BucketShard *bs,
 
     ret = reshard_wait->wait(y);
     if (ret < 0) {
-      ldout(cct, 0) << __func__ <<
+      ldpp_dout(dpp, 0) << __func__ <<
        " ERROR: bucket is still resharding, please retry" << dendl;
       return ret;
     }
   } // for loop
 
-  ldout(cct, 0) << __func__ <<
+  ldpp_dout(dpp, 0) << __func__ <<
     " ERROR: bucket is still resharding, please retry" << dendl;
   return -ERR_BUSY_RESHARDING;
 }
@@ -6823,7 +6823,7 @@ int RGWRados::bucket_index_link_olh(const DoutPrefixProvider *dpp, const RGWBuck
                       return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
                     });
   if (r < 0) {
-    ldout(cct, 20) << "rgw_rados_operate() after cls_rgw_bucket_link_olh() returned r=" << r << dendl;
+    ldpp_dout(dpp, 20) << "rgw_rados_operate() after cls_rgw_bucket_link_olh() returned r=" << r << dendl;
     return r;
   }
 
@@ -6869,7 +6869,7 @@ int RGWRados::bucket_index_unlink_instance(const DoutPrefixProvider *dpp, const
                       return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
                     });
   if (r < 0) {
-    ldout(cct, 20) << "rgw_rados_operate() after cls_rgw_bucket_link_instance() returned r=" << r << dendl;
+    ldpp_dout(dpp, 20) << "rgw_rados_operate() after cls_rgw_bucket_link_instance() returned r=" << r << dendl;
     return r;
   }
 
@@ -6923,7 +6923,7 @@ int RGWRados::bucket_index_read_olh_log(const DoutPrefixProvider *dpp,
                         return r;
                      });
   if (ret < 0) {
-    ldout(cct, 20) << "cls_rgw_get_olh_log() returned r=" << r << dendl;
+    ldpp_dout(dpp, 20) << "cls_rgw_get_olh_log() returned r=" << r << dendl;
     return ret;
   }
 
@@ -7013,7 +7013,7 @@ int RGWRados::bucket_index_trim_olh_log(const DoutPrefixProvider *dpp, const RGW
                         return pbs->bucket_obj.operate(&op, null_yield);
                       });
   if (ret < 0) {
-    ldout(cct, 20) << "cls_rgw_trim_olh_log() returned r=" << ret << dendl;
+    ldpp_dout(dpp, 20) << "cls_rgw_trim_olh_log() returned r=" << ret << dendl;
     return ret;
   }
 
@@ -7043,7 +7043,7 @@ int RGWRados::bucket_index_clear_olh(const DoutPrefixProvider *dpp, const RGWBuc
                             return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
                           });
   if (ret < 0) {
-    ldout(cct, 5) << "rgw_rados_operate() after cls_rgw_clear_olh() returned ret=" << ret << dendl;
+    ldpp_dout(dpp, 5) << "rgw_rados_operate() after cls_rgw_clear_olh() returned ret=" << ret << dendl;
     return ret;
   }
 
@@ -7118,7 +7118,7 @@ int RGWRados::apply_olh_log(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx
     for (; viter != iter->second.end(); ++viter) {
       rgw_bucket_olh_log_entry& entry = *viter;
 
-      ldout(cct, 20) << "olh_log_entry: epoch=" << iter->first << " op=" << (int)entry.op
+      ldpp_dout(dpp, 20) << "olh_log_entry: epoch=" << iter->first << " op=" << (int)entry.op
                      << " key=" << entry.key.name << "[" << entry.key.instance << "] "
                      << (entry.delete_marker ? "(delete)" : "") << dendl;
       switch (entry.op) {
@@ -7129,14 +7129,14 @@ int RGWRados::apply_olh_log(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx
         // only overwrite a link of the same epoch if its key sorts before
         if (link_epoch < iter->first || key.instance.empty() ||
             key.instance > entry.key.instance) {
-          ldout(cct, 20) << "apply_olh_log applying key=" << entry.key << " epoch=" << iter->first << " delete_marker=" << entry.delete_marker
+          ldpp_dout(dpp, 20) << "apply_olh_log applying key=" << entry.key << " epoch=" << iter->first << " delete_marker=" << entry.delete_marker
               << " over current=" << key << " epoch=" << link_epoch << " delete_marker=" << delete_marker << dendl;
           need_to_link = true;
           need_to_remove = false;
           key = entry.key;
           delete_marker = entry.delete_marker;
         } else {
-          ldout(cct, 20) << "apply_olh skipping key=" << entry.key<< " epoch=" << iter->first << " delete_marker=" << entry.delete_marker
+          ldpp_dout(dpp, 20) << "apply_olh skipping key=" << entry.key<< " epoch=" << iter->first << " delete_marker=" << entry.delete_marker
               << " before current=" << key << " epoch=" << link_epoch << " delete_marker=" << delete_marker << dendl;
         }
         break;
@@ -7145,7 +7145,7 @@ int RGWRados::apply_olh_log(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx
         need_to_link = false;
         break;
       default:
-        ldout(cct, 0) << "ERROR: apply_olh_log: invalid op: " << (int)entry.op << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: apply_olh_log: invalid op: " << (int)entry.op << dendl;
         return -EIO;
       }
       string attr_name = RGW_ATTR_OLH_PENDING_PREFIX;
@@ -7286,7 +7286,7 @@ int RGWRados::set_olh(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, cons
                                 op_tag, meta, olh_epoch, unmod_since, high_precision_time,
                                 zones_trace, log_data_change);
     if (ret < 0) {
-      ldout(cct, 20) << "bucket_index_link_olh() target_obj=" << target_obj << " delete_marker=" << (int)delete_marker << " returned " << ret << dendl;
+      ldpp_dout(dpp, 20) << "bucket_index_link_olh() target_obj=" << target_obj << " delete_marker=" << (int)delete_marker << " returned " << ret << dendl;
       if (ret == -ECANCELED) {
         // the bucket index rejected the link_olh() due to olh tag mismatch;
         // attempt to reconstruct olh head attributes based on the bucket index
@@ -7311,7 +7311,7 @@ int RGWRados::set_olh(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, cons
     ret = 0;
   }
   if (ret < 0) {
-    ldout(cct, 20) << "update_olh() target_obj=" << target_obj << " returned " << ret << dendl;
+    ldpp_dout(dpp, 20) << "update_olh() target_obj=" << target_obj << " returned " << ret << dendl;
     return ret;
   }
 
@@ -7372,7 +7372,7 @@ int RGWRados::unlink_obj_instance(const DoutPrefixProvider *dpp, RGWObjectCtx& o
     return 0;
   }
   if (ret < 0) {
-    ldout(cct, 20) << "update_olh() target_obj=" << target_obj << " returned " << ret << dendl;
+    ldpp_dout(dpp, 20) << "update_olh() target_obj=" << target_obj << " returned " << ret << dendl;
     return ret;
   }
 
@@ -8333,7 +8333,7 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp,
    * few results, perhaps due to filtering or to a series of
    * namespaced entries */
 
-  ldout(cct, 10) << "RGWRados::" << __func__ << ": " << bucket_info.bucket <<
+  ldpp_dout(dpp, 10) << "RGWRados::" << __func__ << ": " << bucket_info.bucket <<
     " start_after=\"" << start_after.name <<
     "[" << start_after.instance <<
     "]\", prefix=\"" << prefix <<
@@ -8370,7 +8370,7 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp,
     num_entries_per_shard = num_entries;
   }
 
-  ldout(cct, 10) << "RGWRados::" << __func__ <<
+  ldpp_dout(dpp, 10) << "RGWRados::" << __func__ <<
     " request from each of " << shard_count <<
     " shard(s) for " << num_entries_per_shard << " entries to get " <<
     num_entries << " total entries" << dendl;
@@ -8482,7 +8482,7 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp,
     const string& name = tracker.entry_name();
     rgw_bucket_dir_entry& dirent = tracker.dir_entry();
 
-    ldout(cct, 20) << "RGWRados::" << __func__ << " currently processing " <<
+    ldpp_dout(dpp, 20) << "RGWRados::" << __func__ << " currently processing " <<
       dirent.key << " from shard " << tracker.shard_idx << dendl;
 
     const bool force_check =
@@ -8508,13 +8508,13 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp,
     }
 
     if (r >= 0) {
-      ldout(cct, 10) << "RGWRados::" << __func__ << ": got " <<
+      ldpp_dout(dpp, 10) << "RGWRados::" << __func__ << ": got " <<
        dirent.key.name << "[" << dirent.key.instance << "]" << dendl;
       m[name] = std::move(dirent);
       last_entry_visited = &(m[name]);
       ++count;
     } else {
-      ldout(cct, 10) << "RGWRados::" << __func__ << ": skipping " <<
+      ldpp_dout(dpp, 10) << "RGWRados::" << __func__ << ": skipping " <<
        dirent.key.name << "[" << dirent.key.instance << "]" << dendl;
       last_entry_visited = &tracker.dir_entry();
     }
@@ -8557,22 +8557,22 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp,
     }
   }
 
-  ldout(cct, 20) << "RGWRados::" << __func__ <<
+  ldpp_dout(dpp, 20) << "RGWRados::" << __func__ <<
     ": returning, count=" << count << ", is_truncated=" << *is_truncated <<
     dendl;
 
   if (*is_truncated && count < num_entries) {
-    ldout(cct, 10) << "RGWRados::" << __func__ <<
+    ldpp_dout(dpp, 10) << "RGWRados::" << __func__ <<
       ": INFO requested " << num_entries << " entries but returning " <<
       count << ", which is truncated" << dendl;
   }
 
   if (last_entry_visited != nullptr && last_entry) {
     *last_entry = last_entry_visited->key;
-    ldout(cct, 20) << "RGWRados::" << __func__ <<
+    ldpp_dout(dpp, 20) << "RGWRados::" << __func__ <<
       ": returning, last_entry=" << *last_entry << dendl;
   } else {
-    ldout(cct, 20) << "RGWRados::" << __func__ <<
+    ldpp_dout(dpp, 20) << "RGWRados::" << __func__ <<
       ": returning, last_entry NOT SET" << dendl;
   }
 
@@ -8592,7 +8592,7 @@ int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp,
                                        rgw_obj_index_key *last_entry,
                                         optional_yield y,
                                        check_filter_t force_check_filter) {
-  ldout(cct, 10) << "cls_bucket_list_unordered " << bucket_info.bucket <<
+  ldpp_dout(dpp, 10) << "cls_bucket_list_unordered " << bucket_info.bucket <<
     " start_after " << start_after.name << "[" << start_after.instance <<
     "] num_entries " << num_entries << dendl;
 
@@ -8691,7 +8691,7 @@ int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp,
 
       // at this point either r >=0 or r == -ENOENT
       if (r >= 0) { // i.e., if r != -ENOENT
-       ldout(cct, 10) << "RGWRados::cls_bucket_list_unordered: got " <<
+       ldpp_dout(dpp, 10) << "RGWRados::cls_bucket_list_unordered: got " <<
          dirent.key.name << "[" << dirent.key.instance << "]" << dendl;
 
        if (count < num_entries) {
@@ -8873,7 +8873,7 @@ int RGWRados::check_disk_state(const DoutPrefixProvider *dpp,
   get_obj_bucket_and_oid_loc(obj, oid, loc);
 
   if (loc != list_state.locator) {
-    ldout(cct, 0) << "WARNING: generated locator (" << loc << ") is different from listed locator (" << list_state.locator << ")" << dendl;
+    ldpp_dout(dpp, 0) << "WARNING: generated locator (" << loc << ") is different from listed locator (" << list_state.locator << ")" << dendl;
   }
 
   io_ctx.locator_set_key(list_state.locator);
@@ -9050,7 +9050,7 @@ int RGWRados::check_bucket_shards(const RGWBucketInfo& bucket_info,
     return 0;
   }
 
-  ldout(cct, 1) << "RGWRados::" << __func__ << " bucket " << bucket.name <<
+  ldpp_dout(dpp, 1) << "RGWRados::" << __func__ << " bucket " << bucket.name <<
     " needs resharding; current num shards " << bucket_info.layout.current_index.layout.normal.num_shards <<
     "; new num shards " << final_num_shards << " (suggested " <<
     suggested_num_shards << ")" << dendl;
@@ -9066,7 +9066,7 @@ int RGWRados::add_bucket_to_reshard(const RGWBucketInfo& bucket_info, uint32_t n
 
   new_num_shards = std::min(new_num_shards, get_max_bucket_shards());
   if (new_num_shards <= num_source_shards) {
-    ldout(cct, 20) << "not resharding bucket name=" << bucket_info.bucket.name << ", orig_num=" << num_source_shards << ", new_num_shards=" << new_num_shards << dendl;
+    ldpp_dout(dpp, 20) << "not resharding bucket name=" << bucket_info.bucket.name << ", orig_num=" << num_source_shards << ", new_num_shards=" << new_num_shards << dendl;
     return 0;
   }
 
index c2c915ce193fe848180e555c0ada3bcfc87d34a0..af7037fb3da48e7c5cfeb28b284327749bf3abbb 100644 (file)
@@ -393,7 +393,7 @@ class BucketInfoReshardUpdate
     bucket_info.reshard_status = s;
     int ret = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), &bucket_attrs, dpp);
     if (ret < 0) {
-      ldout(store->ctx(), 0) << "ERROR: failed to write bucket info, ret=" << ret << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to write bucket info, ret=" << ret << dendl;
       return ret;
     }
     return 0;
@@ -549,7 +549,7 @@ int RGWBucketReshard::do_reshard(int num_shards,
   list<rgw_cls_bi_entry> entries;
 
   if (max_entries < 0) {
-    ldout(store->ctx(), 0) << __func__ <<
+    ldpp_dout(dpp, 0) << __func__ <<
       ": can't reshard, negative max_entries" << dendl;
     return -EINVAL;
   }
@@ -560,7 +560,7 @@ int RGWBucketReshard::do_reshard(int num_shards,
 
   int ret = bucket_info_updater.start();
   if (ret < 0) {
-    ldout(store->ctx(), 0) << __func__ << ": failed to update bucket info ret=" << ret << dendl;
+    ldpp_dout(dpp, 0) << __func__ << ": failed to update bucket info ret=" << ret << dendl;
     return ret;
   }
 
@@ -674,13 +674,13 @@ int RGWBucketReshard::do_reshard(int num_shards,
 
   ret = store->ctl()->bucket->link_bucket(new_bucket_info.owner, new_bucket_info.bucket, bucket_info.creation_time, null_yield, dpp);
   if (ret < 0) {
-    lderr(store->ctx()) << "failed to link new bucket instance (bucket_id=" << new_bucket_info.bucket.bucket_id << ": " << cpp_strerror(-ret) << ")" << dendl;
+    ldpp_dout(dpp, -1) << "failed to link new bucket instance (bucket_id=" << new_bucket_info.bucket.bucket_id << ": " << cpp_strerror(-ret) << ")" << dendl;
     return ret;
   }
 
   ret = bucket_info_updater.complete();
   if (ret < 0) {
-    ldout(store->ctx(), 0) << __func__ << ": failed to update bucket info ret=" << ret << dendl;
+    ldpp_dout(dpp, 0) << __func__ << ": failed to update bucket info ret=" << ret << dendl;
     /* don't error out, reshard process succeeded */
   }
 
@@ -753,13 +753,13 @@ int RGWBucketReshard::execute(int num_shards, int max_op_entries,
   ret = store->ctl()->bucket->remove_bucket_instance_info(bucket_info.bucket,
                                                        bucket_info, null_yield, dpp);
   if (ret < 0) {
-    lderr(store->ctx()) << "Error: " << __func__ <<
+    ldpp_dout(dpp, -1) << "Error: " << __func__ <<
       " failed to clean old bucket info object \"" <<
       bucket_info.bucket.get_key() <<
       "\"created after successful resharding with error " << ret << dendl;
   }
 
-  ldout(store->ctx(), 1) << __func__ <<
+  ldpp_dout(dpp, 1) << __func__ <<
     " INFO: reshard of bucket \"" << bucket_info.bucket.name << "\" from \"" <<
     bucket_info.bucket.get_key() << "\" to \"" <<
     new_bucket_info.bucket.get_key() << "\" completed successfully" << dendl;
@@ -784,7 +784,7 @@ error_out:
                                                         new_bucket_info,
                                                        null_yield, dpp);
   if (ret2 < 0) {
-    lderr(store->ctx()) << "Error: " << __func__ <<
+    ldpp_dout(dpp, -1) << "Error: " << __func__ <<
       " failed to clean bucket info object \"" <<
       new_bucket_info.bucket.get_key() <<
       "\"created during incomplete resharding with error " << ret2 << dendl;
@@ -1000,7 +1000,7 @@ int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvid
 
   int ret = logshard_lock.lock();
   if (ret < 0) { 
-    ldout(store->ctx(), 5) << __func__ << "(): failed to acquire lock on " <<
+    ldpp_dout(dpp, 5) << __func__ << "(): failed to acquire lock on " <<
       logshard_oid << ", ret = " << ret <<dendl;
     return ret;
   }
@@ -1009,7 +1009,7 @@ int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvid
     std::list<cls_rgw_reshard_entry> entries;
     ret = list(logshard_num, marker, max_entries, entries, &truncated);
     if (ret < 0) {
-      ldout(cct, 10) << "cannot list all reshards in logshard oid=" <<
+      ldpp_dout(dpp, 10) << "cannot list all reshards in logshard oid=" <<
        logshard_oid << dendl;
       continue;
     }
@@ -1017,7 +1017,7 @@ int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvid
     for(auto& entry: entries) { // logshard entries
       if(entry.new_instance_id.empty()) {
 
-       ldout(store->ctx(), 20) << __func__ << " resharding " <<
+       ldpp_dout(dpp, 20) << __func__ << " resharding " <<
          entry.bucket_name  << dendl;
 
        rgw_bucket bucket;
@@ -1030,7 +1030,7 @@ int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvid
                                                 null_yield, dpp, &attrs);
        if (ret < 0 || bucket_info.bucket.bucket_id != entry.bucket_id) {
          if (ret < 0) {
-           ldout(cct, 0) <<  __func__ <<
+           ldpp_dout(dpp, 0) <<  __func__ <<
              ": Error in get_bucket_info for bucket " << entry.bucket_name <<
              ": " << cpp_strerror(-ret) << dendl;
            if (ret != -ENOENT) {
@@ -1038,20 +1038,20 @@ int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvid
              return ret;
            }
          } else {
-           ldout(cct,0) << __func__ <<
+           ldpp_dout(dpp, 0) << __func__ <<
              ": Bucket: " << entry.bucket_name <<
              " already resharded by someone, skipping " << dendl;
          }
 
          // we've encountered a reshard queue entry for an apparently
          // non-existent bucket; let's try to recover by cleaning up
-         ldout(cct, 0) <<  __func__ <<
+         ldpp_dout(dpp, 0) <<  __func__ <<
            ": removing reshard queue entry for a resharded or non-existent bucket" <<
            entry.bucket_name << dendl;
 
          ret = remove(entry);
          if (ret < 0) {
-           ldout(cct, 0) << __func__ <<
+           ldpp_dout(dpp, 0) << __func__ <<
              ": Error removing non-existent bucket " <<
              entry.bucket_name << " from resharding queue: " <<
              cpp_strerror(-ret) << dendl;
@@ -1066,19 +1066,19 @@ int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvid
        ret = br.execute(entry.new_num_shards, max_entries, dpp, false, nullptr,
                         nullptr, this);
        if (ret < 0) {
-         ldout(store->ctx(), 0) <<  __func__ <<
+         ldpp_dout(dpp, 0) <<  __func__ <<
            ": Error during resharding bucket " << entry.bucket_name << ":" <<
            cpp_strerror(-ret)<< dendl;
          return ret;
        }
 
-       ldout(store->ctx(), 20) << __func__ <<
+       ldpp_dout(dpp, 20) << __func__ <<
          " removing reshard queue entry for bucket " << entry.bucket_name <<
          dendl;
 
        ret = remove(entry);
        if (ret < 0) {
-         ldout(cct, 0) << __func__ << ": Error removing bucket " <<
+         ldpp_dout(dpp, 0) << __func__ << ": Error removing bucket " <<
            entry.bucket_name << " from resharding queue: " <<
            cpp_strerror(-ret) << dendl;
          return ret;
@@ -1116,7 +1116,7 @@ void  RGWReshard::get_logshard_oid(int shard_num, string *logshard)
 int RGWReshard::process_all_logshards(const DoutPrefixProvider *dpp)
 {
   if (!store->svc()->zone->can_reshard()) {
-    ldout(store->ctx(), 20) << __func__ << " Resharding is disabled"  << dendl;
+    ldpp_dout(dpp, 20) << __func__ << " Resharding is disabled"  << dendl;
     return 0;
   }
   int ret = 0;
@@ -1125,11 +1125,11 @@ int RGWReshard::process_all_logshards(const DoutPrefixProvider *dpp)
     string logshard;
     get_logshard_oid(i, &logshard);
 
-    ldout(store->ctx(), 20) << "processing logshard = " << logshard << dendl;
+    ldpp_dout(dpp, 20) << "processing logshard = " << logshard << dendl;
 
     ret = process_single_logshard(i, dpp);
 
-    ldout(store->ctx(), 20) << "finish processing logshard = " << logshard << " , ret = " << ret << dendl;
+    ldpp_dout(dpp, 20) << "finish processing logshard = " << logshard << " , ret = " << ret << dendl;
   }
 
   return 0;
index ae0ce55530634435a974dc1b26239053ce89ad32..07376bbe56960df2485be427d31dcb7623147d2a 100644 (file)
@@ -59,7 +59,7 @@ void RGWOp_Metadata_Get::execute(optional_yield y) {
   /* Get keys */
   op_ret = meta_mgr->get(metadata_key, s->formatter, s->yield, s);
   if (op_ret < 0) {
-    dout(5) << "ERROR: can't get key: " << cpp_strerror(op_ret) << dendl;
+    ldpp_dout(s, 5) << "ERROR: can't get key: " << cpp_strerror(op_ret) << dendl;
     return;
   }
 
@@ -266,7 +266,7 @@ void RGWOp_Metadata_Put::execute(optional_yield y) {
   op_ret = store->ctl()->meta.mgr->put(metadata_key, bl, s->yield, s, sync_type,
                                       false, &ondisk_version);
   if (op_ret < 0) {
-    dout(5) << "ERROR: can't put key: " << cpp_strerror(op_ret) << dendl;
+    ldpp_dout(s, 5) << "ERROR: can't put key: " << cpp_strerror(op_ret) << dendl;
     return;
   }
   // translate internal codes into return header
@@ -296,7 +296,7 @@ void RGWOp_Metadata_Delete::execute(optional_yield y) {
   frame_metadata_key(s, metadata_key);
   op_ret = store->ctl()->meta.mgr->remove(metadata_key, s->yield, s);
   if (op_ret < 0) {
-    dout(5) << "ERROR: can't remove key: " << cpp_strerror(op_ret) << dendl;
+    ldpp_dout(s, 5) << "ERROR: can't remove key: " << cpp_strerror(op_ret) << dendl;
     return;
   }
   op_ret = 0;
index 1dae2a933d0553b241156b96edc8fc22a22ad1a9..fcea7df4dc6a1e5a97511afb28150badd294bf79 100644 (file)
@@ -212,7 +212,7 @@ void RGWListOIDCProviders::execute(optional_yield y)
     for (const auto& it : result) {
       s->formatter->open_object_section("Arn");
       auto& arn = it.get_arn();
-      ldout(s->cct, 0) << "ARN: " << arn << dendl;
+      ldpp_dout(s, 0) << "ARN: " << arn << dendl;
       s->formatter->dump_string("Arn", arn);
       s->formatter->close_section();
     }
index a0d405da10c04852d6d092ac25054d9b5f7b2637..e94b7d44491a21d186d0f2e6f1ecc121f955ab06 100644 (file)
@@ -171,10 +171,10 @@ void RGWPSAckSubEventOp::execute(optional_yield y) {
   auto sub = ps->get_sub_with_events(sub_name);
   op_ret = sub->remove_event(s, event_id);
   if (op_ret < 0) {
-    ldout(s->cct, 1) << "failed to ack event on subscription '" << sub_name << "', ret=" << op_ret << dendl;
+    ldpp_dout(this, 1) << "failed to ack event on subscription '" << sub_name << "', ret=" << op_ret << dendl;
     return;
   }
-  ldout(s->cct, 20) << "successfully acked event on subscription '" << sub_name << "'" << dendl;
+  ldpp_dout(this, 20) << "successfully acked event on subscription '" << sub_name << "'" << dendl;
 }
 
 void RGWPSPullSubEventsOp::execute(optional_yield y) {
@@ -191,10 +191,10 @@ void RGWPSPullSubEventsOp::execute(optional_yield y) {
   }
   op_ret = sub->list_events(s, marker, max_entries);
   if (op_ret < 0) {
-    ldout(s->cct, 1) << "failed to get events from subscription '" << sub_name << "', ret=" << op_ret << dendl;
+    ldpp_dout(this, 1) << "failed to get events from subscription '" << sub_name << "', ret=" << op_ret << dendl;
     return;
   }
-  ldout(s->cct, 20) << "successfully got events from subscription '" << sub_name << "'" << dendl;
+  ldpp_dout(this, 20) << "successfully got events from subscription '" << sub_name << "'" << dendl;
 }
 
 
index da4400b542b4f6e5423418bad3cc5f8c2edca630..a0157c7133725a95cf28d4d1a2170ba5b96dd44f 100644 (file)
@@ -5369,7 +5369,7 @@ AWSGeneralAbstractor::get_auth_data_v4(const req_state* const s,
        case RGW_OP_GET_OBJ://s3select its post-method(payload contain the query) , the request is get-object
           break;
         default:
-          dout(10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED" << dendl;
+          ldpp_dout(s, 10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED" << dendl;
           throw -ERR_NOT_IMPLEMENTED;
       }
 
@@ -5388,7 +5388,7 @@ AWSGeneralAbstractor::get_auth_data_v4(const req_state* const s,
       /* IMHO "streamed" doesn't fit too good here. I would prefer to call
        * it "chunked" but let's be coherent with Amazon's terminology. */
 
-      dout(10) << "body content detected in multiple chunks" << dendl;
+      ldpp_dout(s, 10) << "body content detected in multiple chunks" << dendl;
 
       /* payload in multiple chunks */
 
@@ -5397,11 +5397,11 @@ AWSGeneralAbstractor::get_auth_data_v4(const req_state* const s,
         case RGW_OP_PUT_OBJ:
           break;
         default:
-          dout(10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED (streaming mode)" << dendl;
+          ldpp_dout(s, 10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED (streaming mode)" << dendl;
           throw -ERR_NOT_IMPLEMENTED;
       }
 
-      dout(10) << "aws4 seed signature ok... delaying v4 auth" << dendl;
+      ldpp_dout(s, 10) << "aws4 seed signature ok... delaying v4 auth" << dendl;
 
       /* In the case of streamed payload client sets the x-amz-content-sha256
        * to "STREAMING-AWS4-HMAC-SHA256-PAYLOAD" but uses "UNSIGNED-PAYLOAD"
index e642dc6bc20db1122dc0328756e93eda15ba068c..b4e20870f9249806d1b5ccded16409c466c45649 100644 (file)
@@ -365,7 +365,7 @@ int RGWREST_STS::verify_permission(optional_yield y)
   string rArn = s->info.args.get("RoleArn");
   const auto& [ret, role] = sts.getRoleInfo(s, rArn, y);
   if (ret < 0) {
-    ldout(s->cct, 0) << "failed to get role info using role arn: " << rArn << dendl;
+    ldpp_dout(this, 0) << "failed to get role info using role arn: " << rArn << dendl;
     return ret;
   }
   string policy = role.get_assume_role_policy();
index 6cc3b60c83e440f390cba41466c3a3086d464808..aa6dda3a9d50bffbedb619208a5115a222629bdd 100644 (file)
@@ -981,7 +981,7 @@ void RGWOp_Quota_Set::execute(optional_yield y)
   RGWUser user;
   op_ret = user.init(s, store, op_state, y);
   if (op_ret < 0) {
-    ldout(store->ctx(), 20) << "failed initializing user info: " << op_ret << dendl;
+    ldpp_dout(this, 20) << "failed initializing user info: " << op_ret << dendl;
     return;
   }
 
@@ -995,7 +995,7 @@ void RGWOp_Quota_Set::execute(optional_yield y)
     UserQuotas quotas;
 
     if ((op_ret = rgw_rest_get_json_input(store->ctx(), s, quotas, QUOTA_INPUT_MAX_LEN, NULL)) < 0) {
-      ldout(store->ctx(), 20) << "failed to retrieve input" << dendl;
+      ldpp_dout(this, 20) << "failed to retrieve input" << dendl;
       return;
     }
 
@@ -1008,7 +1008,7 @@ void RGWOp_Quota_Set::execute(optional_yield y)
       bool empty;
       op_ret = rgw_rest_get_json_input(store->ctx(), s, quota, QUOTA_INPUT_MAX_LEN, &empty);
       if (op_ret < 0) {
-        ldout(store->ctx(), 20) << "failed to retrieve input" << dendl;
+        ldpp_dout(this, 20) << "failed to retrieve input" << dendl;
         if (!empty)
           return;
 
@@ -1022,7 +1022,7 @@ void RGWOp_Quota_Set::execute(optional_yield y)
       string err_msg;
       op_ret = user.info(info, &err_msg);
       if (op_ret < 0) {
-        ldout(store->ctx(), 20) << "failed to get user info: " << op_ret << dendl;
+        ldpp_dout(this, 20) << "failed to get user info: " << op_ret << dendl;
         return;
       }
       RGWQuotaInfo *old_quota;
@@ -1053,7 +1053,7 @@ void RGWOp_Quota_Set::execute(optional_yield y)
   string err;
   op_ret = user.modify(s, op_state, y, &err);
   if (op_ret < 0) {
-    ldout(store->ctx(), 20) << "failed updating user info: " << op_ret << ": " << err << dendl;
+    ldpp_dout(this, 20) << "failed updating user info: " << op_ret << ": " << err << dendl;
     return;
   }
 }
index 1139b1fdc78d3a0fc178a743ab5b5e3f9821dd6a..bc9810e50984186cc627ceb263048f96186bea69 100644 (file)
@@ -204,7 +204,7 @@ void RGWGetUserPolicy::execute(optional_yield y)
   map<string, bufferlist> uattrs;
   op_ret = store->ctl()->user->get_attrs_by_uid(s, user_id, &uattrs, s->yield);
   if (op_ret == -ENOENT) {
-    ldout(s->cct, 0) << "ERROR: attrs not found for user" << user_name << dendl;
+    ldpp_dout(this, 0) << "ERROR: attrs not found for user" << user_name << dendl;
     op_ret = -ERR_NO_SUCH_ENTITY;
     return;
   }
@@ -223,12 +223,12 @@ void RGWGetUserPolicy::execute(optional_yield y)
         policy = policies[policy_name];
         dump(s->formatter);
       } else {
-        ldout(s->cct, 0) << "ERROR: policy not found" << policy << dendl;
+        ldpp_dout(this, 0) << "ERROR: policy not found" << policy << dendl;
         op_ret = -ERR_NO_SUCH_ENTITY;
         return;
       }
     } else {
-      ldout(s->cct, 0) << "ERROR: RGW_ATTR_USER_POLICY not found" << dendl;
+      ldpp_dout(this, 0) << "ERROR: RGW_ATTR_USER_POLICY not found" << dendl;
       op_ret = -ERR_NO_SUCH_ENTITY;
       return;
     }
@@ -268,7 +268,7 @@ void RGWListUserPolicies::execute(optional_yield y)
   map<string, bufferlist> uattrs;
   op_ret = store->ctl()->user->get_attrs_by_uid(s, user_id, &uattrs, s->yield);
   if (op_ret == -ENOENT) {
-    ldout(s->cct, 0) << "ERROR: attrs not found for user" << user_name << dendl;
+    ldpp_dout(this, 0) << "ERROR: attrs not found for user" << user_name << dendl;
     op_ret = -ERR_NO_SUCH_ENTITY;
     return;
   }
@@ -291,7 +291,7 @@ void RGWListUserPolicies::execute(optional_yield y)
       s->formatter->close_section();
       s->formatter->close_section();
     } else {
-      ldout(s->cct, 0) << "ERROR: RGW_ATTR_USER_POLICY not found" << dendl;
+      ldpp_dout(this, 0) << "ERROR: RGW_ATTR_USER_POLICY not found" << dendl;
       op_ret = -ERR_NO_SUCH_ENTITY;
       return;
     }
index b34338de59f6be4626837fbe2566ecdbbc0f6553..52374a4193c150fff45c91c329e403a6899c5005 100644 (file)
@@ -86,11 +86,11 @@ int RGWRole::create(const DoutPrefixProvider *dpp, bool exclusive, optional_yiel
   /* check to see the name is not used */
   ret = read_id(dpp, name, tenant, id, y);
   if (exclusive && ret == 0) {
-    ldout(cct, 0) << "ERROR: name " << name << " already in use for role id "
+    ldpp_dout(dpp, 0) << "ERROR: name " << name << " already in use for role id "
                     << id << dendl;
     return -EEXIST;
   } else if ( ret < 0 && ret != -ENOENT) {
-    ldout(cct, 0) << "failed reading role id  " << id << ": "
+    ldpp_dout(dpp, 0) << "failed reading role id  " << id << ": "
                   << cpp_strerror(-ret) << dendl;
     return ret;
   }
@@ -123,21 +123,21 @@ int RGWRole::create(const DoutPrefixProvider *dpp, bool exclusive, optional_yiel
   auto& pool = svc->zone->get_zone_params().roles_pool;
   ret = store_info(exclusive, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR:  storing role info in pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR:  storing role info in pool: " << pool.name << ": "
                   << id << ": " << cpp_strerror(-ret) << dendl;
     return ret;
   }
 
   ret = store_name(exclusive, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: storing role name in pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR: storing role name in pool: " << pool.name << ": "
                   << name << ": " << cpp_strerror(-ret) << dendl;
 
     //Delete the role info that was stored in the previous call
     string oid = get_info_oid_prefix() + id;
     int info_ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
     if (info_ret < 0) {
-      ldout(cct, 0) << "ERROR: cleanup of role id from pool: " << pool.name << ": "
+      ldpp_dout(dpp, 0) << "ERROR: cleanup of role id from pool: " << pool.name << ": "
                   << id << ": " << cpp_strerror(-info_ret) << dendl;
     }
     return ret;
@@ -145,20 +145,20 @@ int RGWRole::create(const DoutPrefixProvider *dpp, bool exclusive, optional_yiel
 
   ret = store_path(exclusive, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: storing role path in pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR: storing role path in pool: " << pool.name << ": "
                   << path << ": " << cpp_strerror(-ret) << dendl;
     //Delete the role info that was stored in the previous call
     string oid = get_info_oid_prefix() + id;
     int info_ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
     if (info_ret < 0) {
-      ldout(cct, 0) << "ERROR: cleanup of role id from pool: " << pool.name << ": "
+      ldpp_dout(dpp, 0) << "ERROR: cleanup of role id from pool: " << pool.name << ": "
                   << id << ": " << cpp_strerror(-info_ret) << dendl;
     }
     //Delete role name that was stored in previous call
     oid = tenant + get_names_oid_prefix() + name;
     int name_ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
     if (name_ret < 0) {
-      ldout(cct, 0) << "ERROR: cleanup of role name from pool: " << pool.name << ": "
+      ldpp_dout(dpp, 0) << "ERROR: cleanup of role name from pool: " << pool.name << ": "
                   << name << ": " << cpp_strerror(-name_ret) << dendl;
     }
     return ret;
@@ -189,7 +189,7 @@ int RGWRole::delete_obj(const DoutPrefixProvider *dpp, optional_yield y)
   string oid = get_info_oid_prefix() + id;
   ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: deleting role id from pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR: deleting role id from pool: " << pool.name << ": "
                   << id << ": " << cpp_strerror(-ret) << dendl;
   }
 
@@ -197,7 +197,7 @@ int RGWRole::delete_obj(const DoutPrefixProvider *dpp, optional_yield y)
   oid = tenant + get_names_oid_prefix() + name;
   ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: deleting role name from pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR: deleting role name from pool: " << pool.name << ": "
                   << name << ": " << cpp_strerror(-ret) << dendl;
   }
 
@@ -205,7 +205,7 @@ int RGWRole::delete_obj(const DoutPrefixProvider *dpp, optional_yield y)
   oid = tenant + get_path_oid_prefix() + path + get_info_oid_prefix() + id;
   ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: deleting role path from pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR: deleting role path from pool: " << pool.name << ": "
                   << path << ": " << cpp_strerror(-ret) << dendl;
   }
   return ret;
@@ -331,7 +331,7 @@ int RGWRole::read_id(const DoutPrefixProvider *dpp, const string& role_name, con
     using ceph::decode;
     decode(nameToId, iter);
   } catch (buffer::error& err) {
-    ldout(cct, 0) << "ERROR: failed to decode role from pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR: failed to decode role from pool: " << pool.name << ": "
                   << role_name << dendl;
     return -EIO;
   }
@@ -349,7 +349,7 @@ int RGWRole::read_info(const DoutPrefixProvider *dpp, optional_yield y)
 
   int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, y, dpp);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: failed reading role info from pool: " << pool.name <<
+    ldpp_dout(dpp, 0) << "ERROR: failed reading role info from pool: " << pool.name <<
                   ": " << id << ": " << cpp_strerror(-ret) << dendl;
     return ret;
   }
@@ -359,7 +359,7 @@ int RGWRole::read_info(const DoutPrefixProvider *dpp, optional_yield y)
     auto iter = bl.cbegin();
     decode(*this, iter);
   } catch (buffer::error& err) {
-    ldout(cct, 0) << "ERROR: failed to decode role info from pool: " << pool.name <<
+    ldpp_dout(dpp, 0) << "ERROR: failed to decode role info from pool: " << pool.name <<
                   ": " << id << dendl;
     return -EIO;
   }
@@ -377,7 +377,7 @@ int RGWRole::read_name(const DoutPrefixProvider *dpp, optional_yield y)
 
   int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, y, dpp);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: failed reading role name from pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR: failed reading role name from pool: " << pool.name << ": "
                   << name << ": " << cpp_strerror(-ret) << dendl;
     return ret;
   }
@@ -388,7 +388,7 @@ int RGWRole::read_name(const DoutPrefixProvider *dpp, optional_yield y)
     auto iter = bl.cbegin();
     decode(nameToId, iter);
   } catch (buffer::error& err) {
-    ldout(cct, 0) << "ERROR: failed to decode role name from pool: " << pool.name << ": "
+    ldpp_dout(dpp, 0) << "ERROR: failed to decode role name from pool: " << pool.name << ": "
                   << name << dendl;
     return -EIO;
   }
@@ -468,7 +468,7 @@ int RGWRole::get_roles_by_path_prefix(const DoutPrefixProvider *dpp,
     list<string> oids;
     int r = store->list_raw_objects(pool, prefix, 1000, ctx, oids, &is_truncated);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: listing filtered objects failed: " << pool.name << ": "
+      ldpp_dout(dpp, 0) << "ERROR: listing filtered objects failed: " << pool.name << ": "
                   << prefix << ": " << cpp_strerror(-r) << dendl;
       return r;
     }
index 2b56880bbd7b6d43a2f2e122fa6048ec0abd69b7..a37df7d147c2bdfbd4cf083ad51fc69c8069b4c2 100644 (file)
@@ -110,7 +110,7 @@ int RGWRadosBucket::remove_bucket(const DoutPrefixProvider *dpp, bool delete_chi
        return ret;
 
     if (!results.objs.empty() && !delete_children) {
-      lderr(store->ctx()) << "ERROR: could not remove non-empty bucket " << info.bucket.name <<
+      ldpp_dout(dpp, -1) << "ERROR: could not remove non-empty bucket " << info.bucket.name <<
        dendl;
       return -ENOTEMPTY;
     }
@@ -144,7 +144,7 @@ int RGWRadosBucket::remove_bucket(const DoutPrefixProvider *dpp, bool delete_chi
   // remain is detrius from a prior bug
   ret = store->getRados()->delete_bucket(info, ot, y, dpp, !delete_children);
   if (ret < 0) {
-    lderr(store->ctx()) << "ERROR: could not remove bucket " <<
+    ldpp_dout(dpp, -1) << "ERROR: could not remove bucket " <<
       info.bucket.name << dendl;
     return ret;
   }
@@ -160,7 +160,7 @@ int RGWRadosBucket::remove_bucket(const DoutPrefixProvider *dpp, bool delete_chi
 
   ret = store->ctl()->bucket->unlink_bucket(info.owner, info.bucket, y, dpp, false);
   if (ret < 0) {
-    lderr(store->ctx()) << "ERROR: unable to remove user bucket information" << dendl;
+    ldpp_dout(dpp, -1) << "ERROR: unable to remove user bucket information" << dendl;
   }
 
   if (forward_to_master) {
index e9c40c6dee54c9dbb9c4a2ad94ce1fd30ac47adf..432c887c87814142610713b3485f2258ac4403e1 100644 (file)
@@ -116,28 +116,28 @@ int RGWServices_Def::init(CephContext *cct,
 
   int r = finisher->start(y, dpp);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to start finisher service (" << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to start finisher service (" << cpp_strerror(-r) << dendl;
     return r;
   }
 
   if (!raw) {
     r = notify->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start notify service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start notify service (" << cpp_strerror(-r) << dendl;
       return r;
     }
   }
 
   r = rados->start(y, dpp);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to start rados service (" << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to start rados service (" << cpp_strerror(-r) << dendl;
     return r;
   }
 
   if (!raw) {
     r = zone->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start zone service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start zone service (" << cpp_strerror(-r) << dendl;
       return r;
     }
 
@@ -151,95 +151,95 @@ int RGWServices_Def::init(CephContext *cct,
 
     r = mdlog->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start mdlog service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start mdlog service (" << cpp_strerror(-r) << dendl;
       return r;
     }
 
     r = sync_modules->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start sync modules service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start sync modules service (" << cpp_strerror(-r) << dendl;
       return r;
     }
   }
 
   r = cls->start(y, dpp);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to start cls service (" << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to start cls service (" << cpp_strerror(-r) << dendl;
     return r;
   }
 
   r = config_key_rados->start(y, dpp);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to start config_key service (" << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to start config_key service (" << cpp_strerror(-r) << dendl;
     return r;
   }
 
   r = zone_utils->start(y, dpp);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to start zone_utils service (" << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to start zone_utils service (" << cpp_strerror(-r) << dendl;
     return r;
   }
 
   r = quota->start(y, dpp);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to start quota service (" << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to start quota service (" << cpp_strerror(-r) << dendl;
     return r;
   }
 
   r = sysobj_core->start(y, dpp);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to start sysobj_core service (" << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to start sysobj_core service (" << cpp_strerror(-r) << dendl;
     return r;
   }
 
   if (have_cache) {
     r = sysobj_cache->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start sysobj_cache service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start sysobj_cache service (" << cpp_strerror(-r) << dendl;
       return r;
     }
   }
 
   r = sysobj->start(y, dpp);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to start sysobj service (" << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to start sysobj service (" << cpp_strerror(-r) << dendl;
     return r;
   }
 
   if (!raw) {
     r = meta_be_sobj->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start meta_be_sobj service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start meta_be_sobj service (" << cpp_strerror(-r) << dendl;
       return r;
     }
 
     r = meta->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start meta service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start meta service (" << cpp_strerror(-r) << dendl;
       return r;
     }
 
     r = bucket_sobj->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start bucket service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start bucket service (" << cpp_strerror(-r) << dendl;
       return r;
     }
 
     r = bucket_sync_sobj->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start bucket_sync service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start bucket_sync service (" << cpp_strerror(-r) << dendl;
       return r;
     }
 
     r = user_rados->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start user_rados service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start user_rados service (" << cpp_strerror(-r) << dendl;
       return r;
     }
 
     r = otp->start(y, dpp);
     if (r < 0) {
-      ldout(cct, 0) << "ERROR: failed to start otp service (" << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: failed to start otp service (" << cpp_strerror(-r) << dendl;
       return r;
     }
   }
@@ -392,7 +392,7 @@ int RGWCtl::init(RGWServices *_svc, const DoutPrefixProvider *dpp)
 
   int r = _ctl.init(*svc, dpp);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to start init ctls (" << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to start init ctls (" << cpp_strerror(-r) << dendl;
     return r;
   }
 
index 4e29364bc5fd57f3aedb5bcf806132f36d55b5a5..741c16d397c011d4fec55f90d4485d92cb0cc46b 100644 (file)
@@ -286,7 +286,7 @@ std::tuple<int, RGWRole> STSService::getRoleInfo(const DoutPrefixProvider *dpp,
     RGWRole role(cct, store->getRados()->pctl, roleName, r_arn->account);
     if (int ret = role.get(dpp, y); ret < 0) {
       if (ret == -ENOENT) {
-        ldout(cct, 0) << "Role doesn't exist: " << roleName << dendl;
+        ldpp_dout(dpp, 0) << "Role doesn't exist: " << roleName << dendl;
         ret = -ERR_NO_ROLE_FOUND;
       }
       return make_tuple(ret, this->role);
@@ -300,14 +300,14 @@ std::tuple<int, RGWRole> STSService::getRoleInfo(const DoutPrefixProvider *dpp,
       }
       string r_path = role.get_path();
       if (path != r_path) {
-        ldout(cct, 0) << "Invalid Role ARN: Path in ARN does not match with the role path: " << path << " " << r_path << dendl;
+        ldpp_dout(dpp, 0) << "Invalid Role ARN: Path in ARN does not match with the role path: " << path << " " << r_path << dendl;
         return make_tuple(-EACCES, this->role);
       }
       this->role = std::move(role);
       return make_tuple(0, this->role);
     }
   } else {
-    ldout(cct, 0) << "Invalid role arn: " << arn << dendl;
+    ldpp_dout(dpp, 0) << "Invalid role arn: " << arn << dendl;
     return make_tuple(-EINVAL, this->role);
   }
 }
@@ -403,7 +403,7 @@ AssumeRoleResponse STSService::assumeRole(const DoutPrefixProvider *dpp,
   //Get the role info which is being assumed
   boost::optional<rgw::ARN> r_arn = rgw::ARN::parse(req.getRoleARN());
   if (r_arn == boost::none) {
-    ldout(cct, 0) << "Error in parsing role arn: " << req.getRoleARN() << dendl;
+    ldpp_dout(dpp, 0) << "Error in parsing role arn: " << req.getRoleARN() << dendl;
     response.retCode = -EINVAL;
     return response;
   }
index b852c56c6f8e5d55b75d21197910177152a24940..078786d698393da78b13ee7f282dce59352b59a8 100644 (file)
@@ -1089,7 +1089,7 @@ protected:
   int _send_request() override {
     int ret = store->ctl()->meta.mgr->put(raw_key, bl, null_yield, dpp, RGWMDLogSyncType::APPLY_ALWAYS, true);
     if (ret < 0) {
-      ldout(store->ctx(), 0) << "ERROR: can't store key: " << raw_key << " ret=" << ret << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: can't store key: " << raw_key << " ret=" << ret << dendl;
       return ret;
     }
     return 0;
@@ -1143,7 +1143,7 @@ protected:
   int _send_request() override {
     int ret = store->ctl()->meta.mgr->remove(raw_key, null_yield, dpp);
     if (ret < 0) {
-      ldout(store->ctx(), 0) << "ERROR: can't remove key: " << raw_key << " ret=" << ret << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: can't remove key: " << raw_key << " ret=" << ret << dendl;
       return ret;
     }
     return 0;
index 01bc7a1a7fb8e72f54e5e611916e243e645928a8..e54fbb692c4582c77e938398089c6fb73dfd08c6 100644 (file)
@@ -463,7 +463,7 @@ int BucketTrimInstanceCR::operate()
                                                    dpp));
     if (retcode < 0) {
       if (retcode != -ENOENT) {
-        ldout(cct, 0) << "ERROR: failed to fetch policy handler for bucket=" << bucket << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: failed to fetch policy handler for bucket=" << bucket << dendl;
       }
 
       return set_cr_error(retcode);
@@ -900,12 +900,12 @@ int BucketTrimCR::operate()
     if (!last_cold_marker.empty() && status.marker != last_cold_marker) {
       set_status("writing updated trim status");
       status.marker = std::move(last_cold_marker);
-      ldout(cct, 20) << "writing bucket trim marker=" << status.marker << dendl;
+      ldpp_dout(dpp, 20) << "writing bucket trim marker=" << status.marker << dendl;
       using WriteStatus = RGWSimpleRadosWriteCR<BucketTrimStatus>;
       yield call(new WriteStatus(store->svc()->rados->get_async_processor(), store->svc()->sysobj, obj,
                                  status, &objv));
       if (retcode < 0) {
-        ldout(cct, 4) << "failed to write updated trim status: "
+        ldpp_dout(dpp, 4) << "failed to write updated trim status: "
             << cpp_strerror(retcode) << dendl;
         return set_cr_error(retcode);
       }
index 7cc2efe0990430fcf6fe684f58a9785c72e145d5..26cbdc9561293f440349a8fa7db84096cbe1a0fe 100644 (file)
@@ -62,7 +62,7 @@ int rgw_user_sync_all_stats(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosSto
   do {
     ret = user.list_buckets(dpp, marker, string(), max_entries, false, user_buckets, y);
     if (ret < 0) {
-      ldout(cct, 0) << "failed to read user buckets: ret=" << ret << dendl;
+      ldpp_dout(dpp, 0) << "failed to read user buckets: ret=" << ret << dendl;
       return ret;
     }
     auto& buckets = user_buckets.get_buckets();
@@ -73,7 +73,7 @@ int rgw_user_sync_all_stats(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosSto
 
       ret = bucket->get_bucket_info(dpp, y);
       if (ret < 0) {
-        ldout(cct, 0) << "ERROR: could not read bucket info: bucket=" << bucket << " ret=" << ret << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: could not read bucket info: bucket=" << bucket << " ret=" << ret << dendl;
         continue;
       }
       ret = bucket->sync_user_stats(y);
@@ -83,7 +83,7 @@ int rgw_user_sync_all_stats(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosSto
       }
       ret = bucket->check_bucket_shards(dpp);
       if (ret < 0) {
-       ldout(cct, 0) << "ERROR in check_bucket_shards: " << cpp_strerror(-ret)<< dendl;
+       ldpp_dout(dpp, 0) << "ERROR in check_bucket_shards: " << cpp_strerror(-ret)<< dendl;
       }
     }
   } while (user_buckets.is_truncated());
@@ -114,7 +114,7 @@ int rgw_user_get_all_buckets_stats(const DoutPrefixProvider *dpp,
     ret = rgw_read_user_buckets(dpp, store, user_id, buckets, marker,
                                string(), max_entries, false, y);
     if (ret < 0) {
-      ldout(cct, 0) << "failed to read user buckets: ret=" << ret << dendl;
+      ldpp_dout(dpp, 0) << "failed to read user buckets: ret=" << ret << dendl;
       return ret;
     }
     auto& m = buckets.get_buckets();
@@ -124,7 +124,7 @@ int rgw_user_get_all_buckets_stats(const DoutPrefixProvider *dpp,
       auto& bucket_ent = i.second;
       ret = bucket_ent->read_bucket_stats(dpp, y);
       if (ret < 0) {
-        ldout(cct, 0) << "ERROR: could not get bucket stats: ret=" << ret << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: could not get bucket stats: ret=" << ret << dendl;
         return ret;
       }
       cls_user_bucket_entry entry;
@@ -2028,7 +2028,7 @@ int RGWUser::execute_modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState&
     }
     user_info.user_email = op_email;
   } else if (op_email.empty() && op_state.user_email_specified) {
-    ldout(store->ctx(), 10) << "removing email index: " << user_info.user_email << dendl;
+    ldpp_dout(dpp, 10) << "removing email index: " << user_info.user_email << dendl;
     /* will be physically removed later when calling update() */
     user_info.user_email.clear();
   }
@@ -2923,7 +2923,7 @@ int RGWUserCtl::list_buckets(const DoutPrefixProvider *dpp,
       map<string, RGWBucketEnt>& m = buckets->get_buckets();
       ret = ctl.bucket->read_buckets_stats(m, y, dpp);
       if (ret < 0 && ret != -ENOENT) {
-        ldout(svc.user->ctx(), 0) << "ERROR: could not get stats for buckets" << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: could not get stats for buckets" << dendl;
         return ret;
       }
     }
index f33ca351dbdd7ec0d76326fb0a67942818f96e57..9886cc3ecfdd5558d914850ef97bb231f6ca5d1b 100644 (file)
@@ -640,10 +640,10 @@ int RGWSystemMetaObj::create(const DoutPrefixProvider *dpp, optional_yield y, bo
   /* check to see the name is not used */
   ret = read_id(name, id, y);
   if (exclusive && ret == 0) {
-    ldout(cct, 10) << "ERROR: name " << name << " already in use for obj id " << id << dendl;
+    ldpp_dout(dpp, 10) << "ERROR: name " << name << " already in use for obj id " << id << dendl;
     return -EEXIST;
   } else if ( ret < 0 && ret != -ENOENT) {
-    ldout(cct, 0) << "failed reading obj id  " << id << ": " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, 0) << "failed reading obj id  " << id << ": " << cpp_strerror(-ret) << dendl;
     return ret;
   }
 
@@ -658,7 +658,7 @@ int RGWSystemMetaObj::create(const DoutPrefixProvider *dpp, optional_yield y, bo
 
   ret = store_info(exclusive, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR:  storing info for " << id << ": " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR:  storing info for " << id << ": " << cpp_strerror(-ret) << dendl;
     return ret;
   }
 
@@ -705,13 +705,13 @@ int RGWRealm::create(const DoutPrefixProvider *dpp, optional_yield y, bool exclu
 {
   int ret = RGWSystemMetaObj::create(dpp, y, exclusive);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR creating new realm object " << name << ": " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR creating new realm object " << name << ": " << cpp_strerror(-ret) << dendl;
     return ret;
   }
   // create the control object for watch/notify
   ret = create_control(exclusive, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR creating control for new realm " << name << ": " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR creating control for new realm " << name << ": " << cpp_strerror(-ret) << dendl;
     return ret;
   }
   RGWPeriod period;
@@ -723,7 +723,7 @@ int RGWRealm::create(const DoutPrefixProvider *dpp, optional_yield y, bool exclu
     }
     ret = period.create(dpp, y, true);
     if (ret < 0) {
-      ldout(cct, 0) << "ERROR: creating new period for realm " << name << ": " << cpp_strerror(-ret) << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: creating new period for realm " << name << ": " << cpp_strerror(-ret) << dendl;
       return ret;
     }
   } else {
@@ -1212,13 +1212,13 @@ int RGWPeriod::create(const DoutPrefixProvider *dpp, optional_yield y, bool excl
 
   ret = store_info(exclusive, y);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR:  storing info for " << id << ": " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR:  storing info for " << id << ": " << cpp_strerror(-ret) << dendl;
     return ret;
   }
 
   ret = set_latest_epoch(y, epoch);
   if (ret < 0) {
-    ldout(cct, 0) << "ERROR: setting latest epoch " << id << ": " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: setting latest epoch " << id << ": " << cpp_strerror(-ret) << dendl;
   }
 
   return ret;
@@ -1429,7 +1429,7 @@ int RGWPeriod::commit(const DoutPrefixProvider *dpp,
                      bool force_if_stale)
 {
   auto zone_svc = sysobj_svc->get_zone_svc();
-  ldout(cct, 20) << __func__ << " realm " << realm.get_id() << " period " << current_period.get_id() << dendl;
+  ldpp_dout(dpp, 20) << __func__ << " realm " << realm.get_id() << " period " << current_period.get_id() << dendl;
   // gateway must be in the master zone to commit
   if (master_zone != zone_svc->get_zone_params().get_id()) {
     error_stream << "Cannot commit period on zone "
@@ -1459,24 +1459,24 @@ int RGWPeriod::commit(const DoutPrefixProvider *dpp,
     // store the current metadata sync status in the period
     int r = update_sync_status(store, current_period, error_stream, force_if_stale);
     if (r < 0) {
-      ldout(cct, 0) << "failed to update metadata sync status: "
+      ldpp_dout(dpp, 0) << "failed to update metadata sync status: "
           << cpp_strerror(-r) << dendl;
       return r;
     }
     // create an object with a new period id
     r = create(dpp, y, true);
     if (r < 0) {
-      ldout(cct, 0) << "failed to create new period: " << cpp_strerror(-r) << dendl;
+      ldpp_dout(dpp, 0) << "failed to create new period: " << cpp_strerror(-r) << dendl;
       return r;
     }
     // set as current period
     r = realm.set_current_period(*this, y);
     if (r < 0) {
-      ldout(cct, 0) << "failed to update realm's current period: "
+      ldpp_dout(dpp, 0) << "failed to update realm's current period: "
           << cpp_strerror(-r) << dendl;
       return r;
     }
-    ldout(cct, 4) << "Promoted to master zone and committed new period "
+    ldpp_dout(dpp, 4) << "Promoted to master zone and committed new period "
         << id << dendl;
     realm.notify_new_period(*this, y);
     return 0;
@@ -1497,7 +1497,7 @@ int RGWPeriod::commit(const DoutPrefixProvider *dpp,
   // write the period to rados
   int r = store_info(false, y);
   if (r < 0) {
-    ldout(cct, 0) << "failed to store period: " << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "failed to store period: " << cpp_strerror(-r) << dendl;
     return r;
   }
   // set as latest epoch
@@ -1507,15 +1507,15 @@ int RGWPeriod::commit(const DoutPrefixProvider *dpp,
     return 0;
   }
   if (r < 0) {
-    ldout(cct, 0) << "failed to set latest epoch: " << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "failed to set latest epoch: " << cpp_strerror(-r) << dendl;
     return r;
   }
   r = reflect(y);
   if (r < 0) {
-    ldout(cct, 0) << "failed to update local objects: " << cpp_strerror(-r) << dendl;
+    ldpp_dout(dpp, 0) << "failed to update local objects: " << cpp_strerror(-r) << dendl;
     return r;
   }
-  ldout(cct, 4) << "Committed new epoch " << epoch
+  ldpp_dout(dpp, 4) << "Committed new epoch " << epoch
       << " for period " << id << dendl;
   realm.notify_new_period(*this, y);
   return 0;
@@ -1671,7 +1671,7 @@ int RGWZoneParams::create(const DoutPrefixProvider *dpp, optional_yield y, bool
   auto sysobj = sysobj_svc->get_obj(obj_ctx, obj);
   int r = sysobj.rop().stat(y, dpp);
   if (r < 0) {
-    ldout(cct, 10) << "couldn't find old data placement pools config, setting up new ones for the zone" << dendl;
+    ldpp_dout(dpp, 10) << "couldn't find old data placement pools config, setting up new ones for the zone" << dendl;
     /* a new system, let's set new placement info */
     RGWZonePlacementInfo default_placement;
     default_placement.index_pool = name + "." + default_bucket_index_pool_suffix;
@@ -1683,7 +1683,7 @@ int RGWZoneParams::create(const DoutPrefixProvider *dpp, optional_yield y, bool
 
   r = fix_pool_names(y);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: fix_pool_names returned r=" << r << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: fix_pool_names returned r=" << r << dendl;
     return r;
   }
 
@@ -1696,7 +1696,7 @@ int RGWZoneParams::create(const DoutPrefixProvider *dpp, optional_yield y, bool
   // so we don't override an existing default
   r = set_as_default(y, true);
   if (r < 0 && r != -EEXIST) {
-    ldout(cct, 10) << "WARNING: failed to set zone as default, r=" << r << dendl;
+    ldpp_dout(dpp, 10) << "WARNING: failed to set zone as default, r=" << r << dendl;
   }
 
   return 0;
index d2abf76c6b2e21f920ad356007e66ea97045ca32..74785355fbdcc3412fd1989a9ce9eab0b466053d 100644 (file)
@@ -443,7 +443,7 @@ int RGWSI_BucketIndex_RADOS::handle_overwrite(const DoutPrefixProvider *dpp,
     for (int i = 0; i < shards_num; ++i, ++shard_id) {
       ret = svc.datalog_rados->add_entry(dpp, info, shard_id);
       if (ret < 0) {
-        lderr(cct) << "ERROR: failed writing data log (info.bucket=" << info.bucket << ", shard_id=" << shard_id << ")" << dendl;
+        ldpp_dout(dpp, -1) << "ERROR: failed writing data log (info.bucket=" << info.bucket << ", shard_id=" << shard_id << ")" << dendl;
         return ret;
       }
     }
index a69b0aaaf860c857b055c14b334203a5686dba69..e513bbff330483565d4fa54d86cd80ebc7e882c7 100644 (file)
@@ -228,7 +228,7 @@ int RGWSI_Bucket_SObj::read_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
   try {
     decode(*entry_point, iter);
   } catch (buffer::error& err) {
-    ldout(cct, 0) << "ERROR: could not decode buffer info, caught buffer::error" << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: could not decode buffer info, caught buffer::error" << dendl;
     return -EIO;
   }
   return 0;
@@ -282,7 +282,7 @@ int RGWSI_Bucket_SObj::read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
   if (auto e = binfo_cache->find(cache_key)) {
     if (refresh_version &&
         e->info.objv_tracker.read_version.compare(&(*refresh_version))) {
-      lderr(cct) << "WARNING: The bucket info cache is inconsistent. This is "
+      ldpp_dout(dpp, -1) << "WARNING: The bucket info cache is inconsistent. This is "
         << "a failure that should be debugged. I am a nice machine, "
         << "so I will try to recover." << dendl;
       binfo_cache->invalidate(key);
@@ -306,7 +306,7 @@ int RGWSI_Bucket_SObj::read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
 
   if (ret < 0) {
     if (ret != -ENOENT) {
-      lderr(cct) << "ERROR: do_read_bucket_instance_info failed: " << ret << dendl;
+      ldpp_dout(dpp, -1) << "ERROR: do_read_bucket_instance_info failed: " << ret << dendl;
     } else {
       ldpp_dout(dpp, 20) << "do_read_bucket_instance_info, bucket instance not found (key=" << key << ")" << dendl;
     }
@@ -330,7 +330,7 @@ int RGWSI_Bucket_SObj::read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
 
   if (refresh_version &&
       refresh_version->compare(&info->objv_tracker.read_version)) {
-    lderr(cct) << "WARNING: The OSD has the same version I have. Something may "
+    ldpp_dout(dpp, -1) << "WARNING: The OSD has the same version I have. Something may "
                << "have gone squirrelly. An administrator may have forced a "
                << "change; otherwise there is a problem somewhere." << dendl;
   }
@@ -457,7 +457,7 @@ int RGWSI_Bucket_SObj::read_bucket_info(RGWSI_Bucket_X_Ctx& ctx,
                                   &cache_info, refresh_version);
   *info = e.info;
   if (ret < 0) {
-    lderr(cct) << "ERROR: read_bucket_instance_from_oid failed: " << ret << dendl;
+    ldpp_dout(dpp, -1) << "ERROR: read_bucket_instance_from_oid failed: " << ret << dendl;
     info->bucket = bucket;
     // XXX and why return anything in case of an error anyway?
     return ret;
@@ -475,7 +475,7 @@ int RGWSI_Bucket_SObj::read_bucket_info(RGWSI_Bucket_X_Ctx& ctx,
 
   if (refresh_version &&
       refresh_version->compare(&info->objv_tracker.read_version)) {
-    lderr(cct) << "WARNING: The OSD has the same version I have. Something may "
+    ldpp_dout(dpp, -1) << "WARNING: The OSD has the same version I have. Something may "
                << "have gone squirrelly. An administrator may have forced a "
                << "change; otherwise there is a problem somewhere." << dendl;
   }
@@ -579,7 +579,7 @@ int RGWSI_Bucket_SObj::remove_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
 
   int r = svc.bucket_sync->handle_bi_removal(info, y);
   if (r < 0) {
-    ldout(cct, 0) << "ERROR: failed to update bucket instance sync index: r=" << r << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to update bucket instance sync index: r=" << r << dendl;
     /* returning success as index is just keeping hints, so will keep extra hints,
      * but bucket removal succeeded
      */
index 3cd41895475aa2a584b56e22e575dfe28b677134..0f0285360e8c93cdf8bf4293ad3b42e458b131cc 100644 (file)
@@ -202,14 +202,14 @@ int RGWSI_Bucket_Sync_SObj::do_get_policy_handler(RGWSI_Bucket_X_Ctx& ctx,
                                                      &cache_info);
   if (r < 0) {
     if (r != -ENOENT) {
-      ldout(cct, 0) << "ERROR: svc.bucket->read_bucket_instance_info(key=" << bucket_key << ") returned r=" << r << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: svc.bucket->read_bucket_instance_info(key=" << bucket_key << ") returned r=" << r << dendl;
     }
     return r;
   }
 
   auto zone_policy_handler = svc.zone->get_sync_policy_handler(zone);
   if (!zone_policy_handler) {
-    ldout(cct, 20) << "ERROR: could not find policy handler for zone=" << zone << dendl;
+    ldpp_dout(dpp, 20) << "ERROR: could not find policy handler for zone=" << zone << dendl;
     return -ENOENT;
   }
 
@@ -217,7 +217,7 @@ int RGWSI_Bucket_Sync_SObj::do_get_policy_handler(RGWSI_Bucket_X_Ctx& ctx,
 
   r = e.handler->init(y);
   if (r < 0) {
-    ldout(cct, 20) << "ERROR: failed to init bucket sync policy handler: r=" << r << dendl;
+    ldpp_dout(dpp, 20) << "ERROR: failed to init bucket sync policy handler: r=" << r << dendl;
     return r;
   }
 
@@ -230,12 +230,12 @@ int RGWSI_Bucket_Sync_SObj::do_get_policy_handler(RGWSI_Bucket_X_Ctx& ctx,
                            zone_policy_handler,
                            temp_map, y, dpp);
   if (r < 0) {
-    ldout(cct, 20) << "ERROR: failed to resolve policy hints: bucket_key=" << bucket_key << ", r=" << r << dendl;
+    ldpp_dout(dpp, 20) << "ERROR: failed to resolve policy hints: bucket_key=" << bucket_key << ", r=" << r << dendl;
     return r;
   }
 
   if (!sync_policy_cache->put(svc.cache, cache_key, &e, {&cache_info})) {
-    ldout(cct, 20) << "couldn't put bucket_sync_policy cache entry, might have raced with data changes" << dendl;
+    ldpp_dout(dpp, 20) << "couldn't put bucket_sync_policy cache entry, might have raced with data changes" << dendl;
   }
 
   *handler = e.handler;
index b0f73830ed572b5e8fe9c39e5996858502637d89..8363da2bce170a3af1a1c41aa7bd7d76aa98b154 100644 (file)
@@ -75,7 +75,7 @@ int RGWSI_MDLog::read_history(RGWMetadataLogHistory *state,
     auto sysobj = obj_ctx.get_obj(obj);
     ret = sysobj.wop().remove(y);
     if (ret < 0) {
-      ldout(cct, 0) << "ERROR: meta history is empty, but cannot remove it (" << cpp_strerror(-ret) << ")" << dendl;
+      ldpp_dout(dpp, 0) << "ERROR: meta history is empty, but cannot remove it (" << cpp_strerror(-ret) << ")" << dendl;
       return ret;
     }
     return -ENOENT;
@@ -84,7 +84,7 @@ int RGWSI_MDLog::read_history(RGWMetadataLogHistory *state,
     auto p = bl.cbegin();
     state->decode(p);
   } catch (buffer::error& e) {
-    ldout(cct, 1) << "failed to decode the mdlog history: "
+    ldpp_dout(dpp, 1) << "failed to decode the mdlog history: "
         << e.what() << dendl;
     return -EIO;
   }
index 317b3b0fdb61d92570fb241d3afe84956ea4c414..b5490660a4f64af0baaa0959ce852c86b5d63e9b 100644 (file)
@@ -32,7 +32,7 @@ int RGWSI_SyncModules::do_start(optional_yield, const DoutPrefixProvider *dpp)
     return ret;
   }
 
-  ldout(cct, 20) << "started sync module instance, tier type = " << zone_public_config.tier_type << dendl;
+  ldpp_dout(dpp, 20) << "started sync module instance, tier type = " << zone_public_config.tier_type << dendl;
 
   return 0;
 }
index d701baed3e2a55c6d29ec20452490d12b9e3822c..f547db32b28321d5159fcc39152022a7130bf4f1 100644 (file)
@@ -88,7 +88,7 @@ int RGWSI_User_RADOS::do_start(optional_yield, const DoutPrefixProvider *dpp)
 
   int r = svc.meta->create_be_handler(RGWSI_MetaBackend::Type::MDBE_SOBJ, &be_handler);
   if (r < 0) {
-    ldout(ctx(), 0) << "ERROR: failed to create be handler: r=" << r << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to create be handler: r=" << r << dendl;
     return r;
   }
 
@@ -117,7 +117,7 @@ int RGWSI_User_RADOS::read_user_info(RGWSI_MetaBackend::Context *ctx,
                                const DoutPrefixProvider *dpp)
 {
   if(user.id == RGW_USER_ANON_ID) {
-    ldout(svc.meta_be->ctx(), 20) << "RGWSI_User_RADOS::read_user_info(): anonymous user" << dendl;
+    ldpp_dout(dpp, 20) << "RGWSI_User_RADOS::read_user_info(): anonymous user" << dendl;
     return -ENOENT;
   }
   bufferlist bl;
@@ -135,14 +135,14 @@ int RGWSI_User_RADOS::read_user_info(RGWSI_MetaBackend::Context *ctx,
   try {
     decode(user_id, iter);
     if (user_id.user_id != user) {
-      lderr(svc.meta_be->ctx())  << "ERROR: rgw_get_user_info_by_uid(): user id mismatch: " << user_id.user_id << " != " << user << dendl;
+      ldpp_dout(dpp, -1)  << "ERROR: rgw_get_user_info_by_uid(): user id mismatch: " << user_id.user_id << " != " << user << dendl;
       return -EIO;
     }
     if (!iter.end()) {
       decode(*info, iter);
     }
   } catch (buffer::error& err) {
-    ldout(svc.meta_be->ctx(), 0) << "ERROR: failed to decode user info, caught buffer::error" << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to decode user info, caught buffer::error" << dendl;
     return -EIO;
   }
 
@@ -210,7 +210,7 @@ public:
       int r = svc.user->get_user_info_by_swift(ctx, k.id, &inf, nullptr, nullptr, y, dpp);
       if (r >= 0 && inf.user_id != info.user_id &&
           (!old_info || inf.user_id != old_info->user_id)) {
-        ldout(svc.meta_be->ctx(), 0) << "WARNING: can't store user info, swift id (" << k.id
+        ldpp_dout(dpp, 0) << "WARNING: can't store user info, swift id (" << k.id
           << ") already mapped to another user (" << info.user_id << ")" << dendl;
         return -EEXIST;
       }
@@ -225,7 +225,7 @@ public:
       int r = svc.user->get_user_info_by_access_key(ctx, k.id, &inf, nullptr, nullptr, y, dpp);
       if (r >= 0 && inf.user_id != info.user_id &&
           (!old_info || inf.user_id != old_info->user_id)) {
-        ldout(svc.meta_be->ctx(), 0) << "WARNING: can't store user info, access key already mapped to another user" << dendl;
+        ldpp_dout(dpp, 0) << "WARNING: can't store user info, access key already mapped to another user" << dendl;
         return -EEXIST;
       }
     }
@@ -304,7 +304,7 @@ public:
     if (!old_info.user_id.empty() &&
         old_info.user_id != new_info.user_id) {
       if (old_info.user_id.tenant != new_info.user_id.tenant) {
-        ldout(svc.user->ctx(), 0) << "ERROR: tenant mismatch: " << old_info.user_id.tenant << " != " << new_info.user_id.tenant << dendl;
+        ldpp_dout(dpp, 0) << "ERROR: tenant mismatch: " << old_info.user_id.tenant << " != " << new_info.user_id.tenant << dendl;
         return -EINVAL;
       }
       ret = svc.user->remove_uid_index(ctx, old_info, nullptr, y, dpp);
@@ -438,7 +438,7 @@ int RGWSI_User_RADOS::remove_user_info(RGWSI_MetaBackend::Context *_ctx,
 
   auto kiter = info.access_keys.begin();
   for (; kiter != info.access_keys.end(); ++kiter) {
-    ldout(cct, 10) << "removing key index: " << kiter->first << dendl;
+    ldpp_dout(dpp, 10) << "removing key index: " << kiter->first << dendl;
     ret = remove_key_index(_ctx, kiter->second, y);
     if (ret < 0 && ret != -ENOENT) {
       ldout(cct, 0) << "ERROR: could not remove " << kiter->first << " (access key object), should be fixed (err=" << ret << ")" << dendl;
@@ -449,7 +449,7 @@ int RGWSI_User_RADOS::remove_user_info(RGWSI_MetaBackend::Context *_ctx,
   auto siter = info.swift_keys.begin();
   for (; siter != info.swift_keys.end(); ++siter) {
     auto& k = siter->second;
-    ldout(cct, 10) << "removing swift subuser index: " << k.id << dendl;
+    ldpp_dout(dpp, 10) << "removing swift subuser index: " << k.id << dendl;
     /* check if swift mapping exists */
     ret = remove_swift_name_index(_ctx, k.id, y);
     if (ret < 0 && ret != -ENOENT) {
@@ -458,7 +458,7 @@ int RGWSI_User_RADOS::remove_user_info(RGWSI_MetaBackend::Context *_ctx,
     }
   }
 
-  ldout(cct, 10) << "removing email index: " << info.user_email << dendl;
+  ldpp_dout(dpp, 10) << "removing email index: " << info.user_email << dendl;
   ret = remove_email_index(_ctx, info.user_email, y);
   if (ret < 0 && ret != -ENOENT) {
     ldout(cct, 0) << "ERROR: could not remove email index object for "
@@ -467,7 +467,7 @@ int RGWSI_User_RADOS::remove_user_info(RGWSI_MetaBackend::Context *_ctx,
   }
 
   rgw_raw_obj uid_bucks = get_buckets_obj(info.user_id);
-  ldout(cct, 10) << "removing user buckets index" << dendl;
+  ldpp_dout(dpp, 10) << "removing user buckets index" << dendl;
   RGWSI_MetaBackend_SObj::Context_SObj *ctx = static_cast<RGWSI_MetaBackend_SObj::Context_SObj *>(_ctx);
   auto sysobj = ctx->obj_ctx->get_obj(uid_bucks);
   ret = sysobj.wop().remove(y);
@@ -487,7 +487,7 @@ int RGWSI_User_RADOS::remove_user_info(RGWSI_MetaBackend::Context *_ctx,
 int RGWSI_User_RADOS::remove_uid_index(RGWSI_MetaBackend::Context *ctx, const RGWUserInfo& user_info, RGWObjVersionTracker *objv_tracker,
                                        optional_yield y, const DoutPrefixProvider *dpp)
 {
-  ldout(cct, 10) << "removing user index: " << user_info.user_id << dendl;
+  ldpp_dout(dpp, 10) << "removing user index: " << user_info.user_id << dendl;
 
   RGWSI_MBSObj_RemoveParams params;
   int ret = svc.meta_be->remove(ctx, get_meta_key(user_info.user_id), params, objv_tracker, y, dpp);
@@ -495,7 +495,7 @@ int RGWSI_User_RADOS::remove_uid_index(RGWSI_MetaBackend::Context *ctx, const RG
     string key;
     user_info.user_id.to_str(key);
     rgw_raw_obj uid_obj(svc.zone->get_zone_params().user_uid_pool, key);
-    ldout(cct, 0) << "ERROR: could not remove " << user_info.user_id << ":" << uid_obj << ", should be fixed (err=" << ret << ")" << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: could not remove " << user_info.user_id << ":" << uid_obj << ", should be fixed (err=" << ret << ")" << dendl;
     return ret;
   }
 
@@ -543,7 +543,7 @@ int RGWSI_User_RADOS::get_user_info_from_index(RGWSI_MetaBackend::Context *_ctx,
       return ret;
     }
   } catch (buffer::error& err) {
-    ldout(svc.meta_be->ctx(), 0) << "ERROR: failed to decode user info, caught buffer::error" << dendl;
+    ldpp_dout(dpp, 0) << "ERROR: failed to decode user info, caught buffer::error" << dendl;
     return -EIO;
   }
 
index fa3e1b52aab0129a7eeb10417f4bcffd4620067d..67231381be80933b819edcab6c9beed5c1e7da3f 100644 (file)
@@ -83,25 +83,25 @@ int RGWSI_Zone::do_start(optional_yield y, const DoutPrefixProvider *dpp)
     ldpp_dout(dpp, 0) << "failed reading realm info: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
     return ret;
   } else if (ret != -ENOENT) {
-    ldout(cct, 20) << "realm  " << realm->get_name() << " " << realm->get_id() << dendl;
+    ldpp_dout(dpp, 20) << "realm  " << realm->get_name() << " " << realm->get_id() << dendl;
     ret = current_period->init(cct, sysobj_svc, realm->get_id(), y,
                               realm->get_name());
     if (ret < 0 && ret != -ENOENT) {
-      ldout(cct, 0) << "failed reading current period info: " << " " << cpp_strerror(-ret) << dendl;
+      ldpp_dout(dpp, 0) << "failed reading current period info: " << " " << cpp_strerror(-ret) << dendl;
       return ret;
     }
-    ldout(cct, 20) << "current period " << current_period->get_id() << dendl;  
+    ldpp_dout(dpp, 20) << "current period " << current_period->get_id() << dendl;  
   }
 
   ret = replace_region_with_zonegroup(dpp, y);
   if (ret < 0) {
-    lderr(cct) << "failed converting region to zonegroup : ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, -1) << "failed converting region to zonegroup : ret "<< ret << " " << cpp_strerror(-ret) << dendl;
     return ret;
   }
 
   ret = convert_regionmap(dpp, y);
   if (ret < 0) {
-    lderr(cct) << "failed converting regionmap: " << cpp_strerror(-ret) << dendl;
+    ldpp_dout(dpp, -1) << "failed converting regionmap: " << cpp_strerror(-ret) << dendl;
     return ret;
   }
 
@@ -447,7 +447,7 @@ int RGWSI_Zone::replace_region_with_zonegroup(const DoutPrefixProvider *dpp, opt
     }
     ret = new_realm.create(dpp, y);
     if (ret < 0 && ret != -EEXIST) {
-      ldout(cct, 0) <<  __func__ << " Error creating new realm: " << cpp_strerror(-ret)  << dendl;
+      ldpp_dout(dpp, 0) <<  __func__ << " Error creating new realm: " << cpp_strerror(-ret)  << dendl;
       return ret;
     }
     ret = new_realm.set_as_default(y);
@@ -724,7 +724,7 @@ int RGWSI_Zone::init_zg_from_local(const DoutPrefixProvider *dpp, bool *creating
     ldout(cct, 10) << "Creating default zonegroup " << dendl;
     ret = zonegroup->create_default(dpp, y);
     if (ret < 0) {
-      ldout(cct, 0) << "failure in zonegroup create_default: ret "<< ret << " " << cpp_strerror(-ret)
+      ldpp_dout(dpp, 0) << "failure in zonegroup create_default: ret "<< ret << " " << cpp_strerror(-ret)
         << dendl;
       return ret;
     }
@@ -735,7 +735,7 @@ int RGWSI_Zone::init_zg_from_local(const DoutPrefixProvider *dpp, bool *creating
       return ret;
     }
   }
-  ldout(cct, 20) << "zonegroup " << zonegroup->get_name() << dendl;
+  ldpp_dout(dpp, 20) << "zonegroup " << zonegroup->get_name() << dendl;
   if (zonegroup->is_master_zonegroup()) {
     // use endpoints from the zonegroup's master zone
     auto master = zonegroup->zones.find(zonegroup->master_zone);
@@ -807,7 +807,7 @@ int RGWSI_Zone::convert_regionmap(const DoutPrefixProvider *dpp, optional_yield
     } else if (ret == -ENOENT) {
       ret = zonegroup.create(dpp, y);
       if (ret < 0) {
-       ldout(cct, 0) << "Error could not create " << zonegroup.get_name() << ": " <<
+       ldpp_dout(dpp, 0) << "Error could not create " << zonegroup.get_name() << ": " <<
          cpp_strerror(-ret) << dendl;
        return ret;
       }