From: Andreas Dilger Date: Sun, 11 Apr 2021 02:04:30 +0000 (-0600) Subject: LU-14603 ptlrpc: quiet messages for unsupported opcodes X-Git-Tag: 2.14.52~73 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=a23767580aebfab7f093df562ac7598e85b71b3e LU-14603 ptlrpc: quiet messages for unsupported opcodes Reduce message spew for unhandled RPC opcodes. Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: I35496168e3aa29ecb06076654ef0aa97ba2540e5 Reviewed-on: https://review.whamcloud.com/43257 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Stephane Thiell Reviewed-by: Oleg Drokin --- diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index 4fff6a6..c3213ba 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -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)); }