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