Whamcloud - gitweb
LU-1084 ptlrpc: Change CWARNs to CDEBUGs
authorChristopher J. Morrone <morrone2@llnl.gov>
Sat, 11 Feb 2012 01:34:32 +0000 (17:34 -0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Feb 2012 01:55:07 +0000 (20:55 -0500)
These messages should not appear on the console.  A sysadmin
will have no idea what to make of most of them.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I58bbc1eca9f5082d08cee6c5a95793c0f64ef370
Reviewed-on: http://review.whamcloud.com/2135
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/sec.c
lustre/ptlrpc/sec_bulk.c
lustre/ptlrpc/sec_config.c
lustre/ptlrpc/sec_gc.c
lustre/ptlrpc/sec_null.c
lustre/ptlrpc/sec_plain.c

index 360c745..d2536c5 100644 (file)
@@ -146,7 +146,8 @@ struct ptlrpc_sec_policy * sptlrpc_wireflavor2policy(__u32 flavor)
                 cfs_mutex_down(&load_mutex);
                 if (cfs_atomic_read(&loaded) == 0) {
                         if (cfs_request_module("ptlrpc_gss") == 0)
-                                CWARN("module ptlrpc_gss loaded on demand\n");
+                                CDEBUG(D_SEC,
+                                       "module ptlrpc_gss loaded on demand\n");
                         else
                                 CERROR("Unable to load module ptlrpc_gss\n");
 
@@ -469,12 +470,12 @@ int sptlrpc_req_ctx_switch(struct ptlrpc_request *req,
         LASSERT(req->rq_reqlen);
         LASSERT(req->rq_replen);
 
-        CWARN("req %p: switch ctx %p(%u->%s) -> %p(%u->%s), "
-              "switch sec %p(%s) -> %p(%s)\n", req,
-              oldctx, oldctx->cc_vcred.vc_uid, sec2target_str(oldctx->cc_sec),
-              newctx, newctx->cc_vcred.vc_uid, sec2target_str(newctx->cc_sec),
-              oldctx->cc_sec, oldctx->cc_sec->ps_policy->sp_name,
-              newctx->cc_sec, newctx->cc_sec->ps_policy->sp_name);
+        CDEBUG(D_SEC, "req %p: switch ctx %p(%u->%s) -> %p(%u->%s), "
+               "switch sec %p(%s) -> %p(%s)\n", req,
+               oldctx, oldctx->cc_vcred.vc_uid, sec2target_str(oldctx->cc_sec),
+               newctx, newctx->cc_vcred.vc_uid, sec2target_str(newctx->cc_sec),
+               oldctx->cc_sec, oldctx->cc_sec->ps_policy->sp_name,
+               newctx->cc_sec, newctx->cc_sec->ps_policy->sp_name);
 
         /* save flavor */
         old_flvr = req->rq_flvr;
@@ -552,8 +553,9 @@ int sptlrpc_req_replace_dead_ctx(struct ptlrpc_request *req)
                 /*
                  * still get the old dead ctx, usually means system too busy
                  */
-                CWARN("ctx (%p, fl %lx) doesn't switch, relax a little bit\n",
-                      newctx, newctx->cc_flags);
+                CDEBUG(D_SEC,
+                       "ctx (%p, fl %lx) doesn't switch, relax a little bit\n",
+                       newctx, newctx->cc_flags);
 
                 cfs_schedule_timeout_and_set_state(CFS_TASK_INTERRUPTIBLE,
                                                    CFS_HZ);
@@ -1384,11 +1386,11 @@ static void sptlrpc_import_sec_adapt_inplace(struct obd_import *imp,
         char    str1[32], str2[32];
 
         if (sec->ps_flvr.sf_flags != sf->sf_flags)
-                CWARN("changing sec flags: %s -> %s\n",
-                      sptlrpc_secflags2str(sec->ps_flvr.sf_flags,
-                                           str1, sizeof(str1)),
-                      sptlrpc_secflags2str(sf->sf_flags,
-                                           str2, sizeof(str2)));
+                CDEBUG(D_SEC, "changing sec flags: %s -> %s\n",
+                       sptlrpc_secflags2str(sec->ps_flvr.sf_flags,
+                                            str1, sizeof(str1)),
+                       sptlrpc_secflags2str(sf->sf_flags,
+                                            str2, sizeof(str2)));
 
         cfs_spin_lock(&sec->ps_lock);
         flavor_copy(&sec->ps_flvr, sf);
@@ -1454,11 +1456,11 @@ int sptlrpc_import_sec_adapt(struct obd_import *imp,
                 if (flavor_equal(&sf, &sec->ps_flvr))
                         GOTO(out, rc);
 
-                CWARN("import %s->%s: changing flavor %s -> %s\n",
-                      imp->imp_obd->obd_name,
-                      obd_uuid2str(&conn->c_remote_uuid),
-                      sptlrpc_flavor2name(&sec->ps_flvr, str, sizeof(str)),
-                      sptlrpc_flavor2name(&sf, str2, sizeof(str2)));
+                CDEBUG(D_SEC, "import %s->%s: changing flavor %s -> %s\n",
+                       imp->imp_obd->obd_name,
+                       obd_uuid2str(&conn->c_remote_uuid),
+                       sptlrpc_flavor2name(&sec->ps_flvr, str, sizeof(str)),
+                       sptlrpc_flavor2name(&sf, str2, sizeof(str2)));
 
                 if (SPTLRPC_FLVR_POLICY(sf.sf_rpc) ==
                     SPTLRPC_FLVR_POLICY(sec->ps_flvr.sf_rpc) &&
@@ -1469,11 +1471,11 @@ int sptlrpc_import_sec_adapt(struct obd_import *imp,
                 }
         } else if (SPTLRPC_FLVR_BASE(sf.sf_rpc) !=
                    SPTLRPC_FLVR_BASE(SPTLRPC_FLVR_NULL)) {
-                LCONSOLE_INFO("import %s->%s netid %x: select flavor %s\n",
-                              imp->imp_obd->obd_name,
-                              obd_uuid2str(&conn->c_remote_uuid),
-                              LNET_NIDNET(conn->c_self),
-                              sptlrpc_flavor2name(&sf, str, sizeof(str)));
+                CDEBUG(D_SEC, "import %s->%s netid %x: select flavor %s\n",
+                       imp->imp_obd->obd_name,
+                       obd_uuid2str(&conn->c_remote_uuid),
+                       LNET_NIDNET(conn->c_self),
+                       sptlrpc_flavor2name(&sf, str, sizeof(str)));
         }
 
         cfs_mutex_down(&imp->imp_sec_mutex);
index dfe6b87..a727a9d 100644 (file)
@@ -773,14 +773,15 @@ void sptlrpc_enc_pool_fini(void)
         enc_pools_free();
 
         if (page_pools.epp_st_access > 0) {
-                CWARN("max pages %lu, grows %u, grow fails %u, shrinks %u, "
-                      "access %lu, missing %lu, max qlen %u, max wait "
-                      CFS_TIME_T"/%d\n",
-                      page_pools.epp_st_max_pages, page_pools.epp_st_grows,
-                      page_pools.epp_st_grow_fails,
-                      page_pools.epp_st_shrinks, page_pools.epp_st_access,
-                      page_pools.epp_st_missings, page_pools.epp_st_max_wqlen,
-                      page_pools.epp_st_max_wait, CFS_HZ);
+                CDEBUG(D_SEC,
+                       "max pages %lu, grows %u, grow fails %u, shrinks %u, "
+                       "access %lu, missing %lu, max qlen %u, max wait "
+                       CFS_TIME_T"/%d\n",
+                       page_pools.epp_st_max_pages, page_pools.epp_st_grows,
+                       page_pools.epp_st_grow_fails,
+                       page_pools.epp_st_shrinks, page_pools.epp_st_access,
+                       page_pools.epp_st_missings, page_pools.epp_st_max_wqlen,
+                       page_pools.epp_st_max_wait, CFS_HZ);
         }
 }
 
index 2e4791f..18c317f 100644 (file)
@@ -452,8 +452,8 @@ void sptlrpc_rule_set_dump(struct sptlrpc_rule_set *rset)
 
         for (n = 0; n < rset->srs_nrule; n++) {
                 r = &rset->srs_rules[n];
-                CWARN("<%02d> from %x to %x, net %x, rpc %x\n", n,
-                      r->sr_from, r->sr_to, r->sr_netid, r->sr_flvr.sf_rpc);
+                CDEBUG(D_SEC, "<%02d> from %x to %x, net %x, rpc %x\n", n,
+                       r->sr_from, r->sr_to, r->sr_netid, r->sr_flvr.sf_rpc);
         }
 }
 EXPORT_SYMBOL(sptlrpc_rule_set_dump);
index f6cc912..2e3e539 100644 (file)
@@ -156,7 +156,7 @@ static void sec_do_gc(struct ptlrpc_sec *sec)
         LASSERT(sec->ps_policy->sp_cops->gc_ctx);
 
         if (unlikely(sec->ps_gc_next == 0)) {
-                CWARN("sec %p(%s) has 0 gc time\n",
+                CDEBUG(D_SEC, "sec %p(%s) has 0 gc time\n",
                       sec, sec->ps_policy->sp_name);
                 return;
         }
@@ -198,7 +198,7 @@ again:
                         /* if someone is waiting to be deleted, let it
                          * proceed as soon as possible. */
                         if (cfs_atomic_read(&sec_gc_wait_del)) {
-                                CWARN("deletion pending, start over\n");
+                                CDEBUG(D_SEC, "deletion pending, start over\n");
                                 cfs_mutex_unlock(&sec_gc_mutex);
                                 goto again;
                         }
index 911e3dc..9520150 100644 (file)
@@ -118,8 +118,9 @@ int null_ctx_verify(struct ptlrpc_cli_ctx *ctx, struct ptlrpc_request *req)
                 cksumc = lustre_msg_calc_cksum(req->rq_repmsg);
 #endif
                 if (cksumc != cksums) {
-                        CWARN("early reply checksum mismatch: %08x != %08x\n",
-                              cksumc, cksums);
+                        CDEBUG(D_SEC,
+                               "early reply checksum mismatch: %08x != %08x\n",
+                               cksumc, cksums);
                         return -EINVAL;
                 }
         }
index 283c489..b147884 100644 (file)
@@ -277,8 +277,9 @@ int plain_ctx_verify(struct ptlrpc_cli_ctx *ctx, struct ptlrpc_request *req)
                                  lustre_msg_buf(msg, PLAIN_PACK_MSG_OFF, 0),
                                  lustre_msg_buflen(msg, PLAIN_PACK_MSG_OFF));
                 if (cksum != msg->lm_cksum) {
-                        CWARN("early reply checksum mismatch: %08x != %08x\n",
-                              cpu_to_le32(cksum), msg->lm_cksum);
+                        CDEBUG(D_SEC,
+                               "early reply checksum mismatch: %08x != %08x\n",
+                               cpu_to_le32(cksum), msg->lm_cksum);
                         RETURN(-EINVAL);
                 }
         } else {