]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: switch to SubsystemMap::should_gather<SubV, LvlV>().
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 12 Feb 2018 19:17:14 +0000 (20:17 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 27 Feb 2018 10:38:48 +0000 (11:38 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
16 files changed:
src/mds/Migrator.cc
src/os/filestore/FileStore.cc
src/osd/PG.cc
src/osd/PrimaryLogPG.cc
src/osd/SnapMapper.cc
src/rgw/rgw_client_io.cc
src/rgw/rgw_cr_rados.cc
src/rgw/rgw_crypt.cc
src/rgw/rgw_op.cc
src/rgw/rgw_process.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_rest.cc
src/rgw/rgw_rest_client.cc
src/rgw/rgw_rest_log.cc
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_swift.cc

index a28be44bc3d4bf1f2081cd6281a9a5e64e148244..4bcb2193bf7ed6b226d1bb35103190e533f9ce45 100644 (file)
@@ -622,7 +622,7 @@ void Migrator::show_exporting()
 
 void Migrator::audit()
 {
-  if (!g_conf->subsys.should_gather(ceph_subsys_mds, 5))
+  if (!g_conf->subsys.should_gather<ceph_subsys_mds, 5>())
     return;  // hrm.
 
   // import_state
index 6a0fd8603c6387a8f6bf55b2db43c40201f9d895..6276b29b5987886a8fbe03d89e8cacc52d1845b1 100644 (file)
@@ -5604,7 +5604,7 @@ int FileStore::_omap_setkeys(const coll_t& cid, const ghobject_t &hoid,
     }
   }
 skip:
-  if (g_conf->subsys.should_gather(ceph_subsys_filestore, 20)) {
+  if (g_conf->subsys.should_gather<ceph_subsys_filestore, 20>()) {
     for (auto& p : aset) {
       dout(20) << __FUNC__ << ":  set " << p.first << dendl;
     }
index 7a84647a1759ba2178fe42e46f584824d48876db..649f7177d2f86d1f87c0bef99827ef44d928267f 100644 (file)
@@ -1417,7 +1417,7 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id,
   map<pg_shard_t, pg_info_t> all_info(peer_info.begin(), peer_info.end());
   all_info[pg_whoami] = info;
 
-  if (cct->_conf->subsys.should_gather(dout_subsys, 10)) {
+  if (cct->_conf->subsys.should_gather<dout_subsys, 10>()) {
     for (map<pg_shard_t, pg_info_t>::iterator p = all_info.begin();
          p != all_info.end();
          ++p) {
index 38f999eeb5c1438e6a27f2d81fc6fbe676f19413..dc194e0372998fe754e79754cacd61cd4b13104d 100644 (file)
@@ -7133,7 +7133,7 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
          goto fail;
        }
        tracepoint(osd, do_osd_op_pre_omapsetvals, soid.oid.name.c_str(), soid.snap.val);
-       if (cct->_conf->subsys.should_gather(dout_subsys, 20)) {
+       if (cct->_conf->subsys.should_gather<dout_subsys, 20>()) {
          dout(20) << "setting vals: " << dendl;
          map<string,bufferlist> to_set;
          bufferlist::iterator pt = to_set_bl.begin();
index a544c92b537102cae2cd2b70285b6e0b292f393c..4aa97bf8782ed4d57de5c7956fa4594b85624464 100644 (file)
@@ -170,7 +170,7 @@ void SnapMapper::clear_snaps(
   assert(check(oid));
   set<string> to_remove;
   to_remove.insert(to_object_key(oid));
-  if (g_conf->subsys.should_gather(ceph_subsys_osd, 20)) {
+  if (g_conf->subsys.should_gather<ceph_subsys_osd, 20>()) {
     for (auto& i : to_remove) {
       dout(20) << __func__ << " rm " << i << dendl;
     }
@@ -189,7 +189,7 @@ void SnapMapper::set_snaps(
   encode(in, bl);
   to_set[to_object_key(oid)] = bl;
   dout(20) << __func__ << " " << oid << " " << in.snaps << dendl;
-  if (g_conf->subsys.should_gather(ceph_subsys_osd, 20)) {
+  if (g_conf->subsys.should_gather<ceph_subsys_osd, 20>()) {
     for (auto& i : to_set) {
       dout(20) << __func__ << " set " << i.first << dendl;
     }
@@ -228,7 +228,7 @@ int SnapMapper::update_snaps(
       to_remove.insert(to_raw_key(make_pair(*i, oid)));
     }
   }
-  if (g_conf->subsys.should_gather(ceph_subsys_osd, 20)) {
+  if (g_conf->subsys.should_gather<ceph_subsys_osd, 20>()) {
     for (auto& i : to_remove) {
       dout(20) << __func__ << " rm " << i << dendl;
     }
@@ -259,7 +259,7 @@ void SnapMapper::add_oid(
        ++i) {
     to_add.insert(to_raw(make_pair(*i, oid)));
   }
-  if (g_conf->subsys.should_gather(ceph_subsys_osd, 20)) {
+  if (g_conf->subsys.should_gather<ceph_subsys_osd, 20>()) {
     for (auto& i : to_add) {
       dout(20) << __func__ << " set " << i.first << dendl;
     }
@@ -340,7 +340,7 @@ int SnapMapper::_remove_oid(
        ++i) {
     to_remove.insert(to_raw_key(make_pair(*i, oid)));
   }
-  if (g_conf->subsys.should_gather(ceph_subsys_osd, 20)) {
+  if (g_conf->subsys.should_gather<ceph_subsys_osd, 20>()) {
     for (auto& i : to_remove) {
       dout(20) << __func__ << " rm " << i << dendl;
     }
index 49811a9d201f0980f1131514f5b73accd23e00a6..9528ab6fd67773035924cdaa2a278e7bbc0ae26c 100644 (file)
@@ -19,7 +19,7 @@ namespace io {
   if (init_error != 0)
     return init_error;
 
-  if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+  if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
     const auto& env_map = get_env().get_map();
 
     for (const auto& iter: env_map) {
index 5b68f5a86e45c9b748ae833024d825916e889f9b..eca59a7f6f7a287b354b44c43809443aa4615171 100644 (file)
@@ -41,7 +41,7 @@ void RGWAsyncRadosProcessor::RGWWQ::_process(RGWAsyncRadosRequest *req, ThreadPo
 }
 
 void RGWAsyncRadosProcessor::RGWWQ::_dump_queue() {
-  if (!g_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+  if (!g_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
     return;
   }
   deque<RGWAsyncRadosRequest *>::iterator iter;
index 8af6ce7a9553cd6a39b7e07db3d934f141020bf0..1b2de8ce72f3554ffc93215cf7d576b4b062a03b 100644 (file)
@@ -550,7 +550,7 @@ int RGWGetObj_BlockDecrypt::read_manifest(bufferlist& manifest_bl) {
       }
       parts_len.back() += mi.get_stripe_size();
     }
-    if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+    if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
       for (size_t i = 0; i<parts_len.size(); i++) {
         ldout(cct, 20) << "Manifest part " << i << ", size=" << parts_len[i] << dendl;
       }
index dd8cded1b4063d4c880ef9d66b62a50a457b00b1..bf24dde8be0ac7a5acab2db30dd5fb172a019dbc 100644 (file)
@@ -143,9 +143,9 @@ static int decode_policy(CephContext *cct,
     ldout(cct, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
     return -EIO;
   }
-  if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
-    RGWAccessControlPolicy_S3 *s3policy = static_cast<RGWAccessControlPolicy_S3 *>(policy);
+  if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
     ldout(cct, 15) << __func__ << " Read AccessControlPolicy";
+    RGWAccessControlPolicy_S3 *s3policy = static_cast<RGWAccessControlPolicy_S3 *>(policy);
     s3policy->to_xml(*_dout);
     *_dout << dendl;
   }
@@ -1020,7 +1020,7 @@ int RGWOp::read_bucket_cors()
     ldout(s->cct, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
     return -EIO;
   }
-  if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
+  if (s->cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
     RGWCORSConfiguration_S3 *s3cors = static_cast<RGWCORSConfiguration_S3 *>(&bucket_cors);
     ldout(s->cct, 15) << "Read RGWCORSConfiguration";
     s3cors->to_xml(*_dout);
@@ -4906,7 +4906,7 @@ void RGWPutACLs::execute()
     }
   }
 
-  if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
+  if (s->cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
     ldout(s->cct, 15) << "Old AccessControlPolicy";
     policy->to_xml(*_dout);
     *_dout << dendl;
@@ -4916,7 +4916,7 @@ void RGWPutACLs::execute()
   if (op_ret < 0)
     return;
 
-  if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
+  if (s->cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
     ldout(s->cct, 15) << "New AccessControlPolicy:";
     new_policy.to_xml(*_dout);
     *_dout << dendl;
@@ -5019,7 +5019,7 @@ void RGWPutLC::execute()
   if (op_ret < 0)
     return;
 
-  if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
+  if (s->cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
     ldout(s->cct, 15) << "New LifecycleConfiguration:";
     new_config.to_xml(*_dout);
     *_dout << dendl;
index dd4ca9b6922bd5a6a057f77dd46874869aa5648a..5bf7475b1abb1d3c35c0ac200dcc6f659f165170 100644 (file)
@@ -17,7 +17,7 @@
 
 void RGWProcess::RGWWQ::_dump_queue()
 {
-  if (!g_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+  if (!g_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
     return;
   }
   deque<RGWRequest *>::iterator iter;
index 64a784d8eaf2acc2feb206c582c1953d2c8cf74f..e78190c54c56416eed2d84b72dad75ef0b3fc444 100644 (file)
@@ -5569,7 +5569,7 @@ int rgw_policy_from_attrset(CephContext *cct, map<string, bufferlist>& attrset,
     ldout(cct, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
     return -EIO;
   }
-  if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
+  if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
     RGWAccessControlPolicy_S3 *s3policy = static_cast<RGWAccessControlPolicy_S3 *>(policy);
     ldout(cct, 15) << __func__ << " Read AccessControlPolicy";
     s3policy->to_xml(*_dout);
@@ -9309,7 +9309,8 @@ int RGWRados::get_obj_state_impl(RGWObjectCtx *rctx, const RGWBucketInfo& bucket
       return -EIO;
     }
     ldout(cct, 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()) {
+    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(this) << dendl;
@@ -9870,7 +9871,7 @@ int RGWRados::Object::Read::prepare()
   }
   if (params.attrs) {
     *params.attrs = astate->attrset;
-    if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+    if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
       for (iter = params.attrs->begin(); iter != params.attrs->end(); ++iter) {
         ldout(cct, 20) << "Read xattr: " << iter->first << dendl;
       }
@@ -9974,7 +9975,7 @@ int RGWRados::stat_system_obj(RGWObjectCtx& obj_ctx,
 
   if (attrs) {
     *attrs = astate->attrset;
-    if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+    if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
       map<string, bufferlist>::iterator iter;
       for (iter = attrs->begin(); iter != attrs->end(); ++iter) {
         ldout(cct, 20) << "Read xattr: " << iter->first << dendl;
index 71c142ee2cc7e683750016ad33aaf9ac99839add..946d55b3774906f80101f859ac17f433f917fb83 100644 (file)
@@ -1439,7 +1439,7 @@ int RGWPostObj_ObjStore::get_params()
     return -EINVAL;
   }
 
-  if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+  if (s->cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
     ldout(s->cct, 20) << "request content_type_str="
                      << req_content_type_str << dendl;
     ldout(s->cct, 20) << "request content_type params:" << dendl;
index 22bbfe80f363fed7245dcdc3b856671be04d2aee..079a305c2fc6b71ce6a613bcabca61ee1e400534 100644 (file)
@@ -213,7 +213,7 @@ int RGWRESTSimpleRequest::sign_request(RGWAccessKey& key, RGWEnv& env, req_info&
     return 0;
   }
 
-  if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+  if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
     for (const auto& i: env.get_map()) {
       ldout(cct, 20) << "> " << i.first << " -> " << rgw::crypt_sanitize::x_meta_map{i.first, i.second} << dendl;
     }
index 47d4e3e7a8141446da63082ea59f9d0249118f12..a0510266f411d2a0f1e1b146803a1f86647c3761 100644 (file)
@@ -352,7 +352,7 @@ void RGWOp_MDLog_Notify::execute() {
     return;
   }
 
-  if (store->ctx()->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+  if (store->ctx()->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
     for (set<int>::iterator iter = updated_shards.begin(); iter != updated_shards.end(); ++iter) {
       ldout(s->cct, 20) << __func__ << "(): updated shard=" << *iter << dendl;
     }
@@ -782,7 +782,7 @@ void RGWOp_DATALog_Notify::execute() {
     return;
   }
 
-  if (store->ctx()->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+  if (store->ctx()->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
     for (map<int, set<string> >::iterator iter = updated_shards.begin(); iter != updated_shards.end(); ++iter) {
       ldout(s->cct, 20) << __func__ << "(): updated shard=" << iter->first << dendl;
       set<string>& keys = iter->second;
index fce58c61a66566ed0f7037b529b9421e5ed93618..d9b28ac524e167cadccbedd07b3861e7fb651c64 100644 (file)
@@ -1550,7 +1550,7 @@ int RGWPostObj_ObjStore_S3::get_params()
     if (r < 0)
       return r;
 
-    if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+    if (s->cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
       ldout(s->cct, 20) << "read part header -- part.name="
                         << part.name << dendl;
 
@@ -2345,7 +2345,7 @@ int RGWPutCORS_ObjStore_S3::get_params()
     in_data.append(data, len);
   }
 
-  if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
+  if (s->cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
     ldout(s->cct, 15) << "CORSConfiguration";
     cors_config->to_xml(*_dout);
     *_dout << dendl;
index ae450b87f30ac9702e42de6ebb3c44a8aff136fc..60d9b4a8ffef04b19c43fdd02bb9abe502ba207f 100644 (file)
@@ -2033,7 +2033,7 @@ int RGWFormPost::get_params()
       return ret;
     }
 
-    if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
+    if (s->cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
       ldout(s->cct, 20) << "read part header -- part.name="
                         << part.name << dendl;