Whamcloud - gitweb
LU-14603 ptlrpc: quiet messages for unsupported opcodes 57/43257/3
authorAndreas Dilger <adilger@whamcloud.com>
Sun, 11 Apr 2021 02:04:30 +0000 (20:04 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 11 May 2021 22:53:47 +0000 (22:53 +0000)
Reduce message spew for unhandled RPC opcodes.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I35496168e3aa29ecb06076654ef0aa97ba2540e5
Reviewed-on: https://review.whamcloud.com/43257
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Stephane Thiell <sthiell@stanford.edu>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/target/tgt_handler.c

index 4fff6a6..c3213ba 100644 (file)
@@ -622,8 +622,14 @@ static struct tgt_handler *tgt_handler_find_check(struct ptlrpc_request *req)
 
        /* opcode was not found in slice */
        if (unlikely(s->tos_hs == NULL)) {
-               CERROR("%s: no handlers for opcode 0x%x\n", tgt_name(tgt),
-                      opc);
+               static bool printed;
+
+               /* don't spew error messages for unhandled RPCs */
+               if (!printed) {
+                       CERROR("%s: no handler for opcode 0x%x from %s\n",
+                              tgt_name(tgt), opc, libcfs_id2str(req->rq_peer));
+                       printed = true;
+               }
                RETURN(ERR_PTR(-ENOTSUPP));
        }