From 2cbdbb65a6a40434191ef6c8a26acc2595cffb53 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sat, 10 Apr 2021 20:04:30 -0600 Subject: [PATCH] LU-14603 ptlrpc: quiet messages for unsupported opcodes Quiet messages for OST_FALLOCATE and OST_SEEK RPCs that can be sent from 2.14.0 clients. Lustre-change: https://review.whamcloud.com/43257 Lustre-commit: TBD (from c7427f6618308996e76718baeba492c0b09dd5b3) Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: I35496168e3aa29ecb06076654ef0aa97ba2540e5 Reviewed-on: https://review.whamcloud.com/43260 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Stephane Thiell Reviewed-by: Oleg Drokin --- lustre/include/uapi/linux/lustre/lustre_idl.h | 4 +++- lustre/target/tgt_handler.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index c1fd62d..da92408 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -1043,7 +1043,9 @@ enum ost_cmd { OST_QUOTACTL = 19, OST_QUOTA_ADJUST_QUNIT = 20, /* not used since 2.4 */ OST_LADVISE = 21, - OST_LAST_OPC /* must be < 33 to avoid MDS_GETATTR */ + OST_LAST_OPC, /* must be < 33 to avoid MDS_GETATTR */ + OST_FALLOCATE = 22, + OST_SEEK = 23, }; #define OST_FIRST_OPC OST_REPLY diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index 4386cd7..2178966 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -613,8 +613,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 print error messages for known unhandled RPCs */ + if (opc != OST_FALLOCATE && opc != OST_SEEK && !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)); } -- 1.8.3.1