Whamcloud - gitweb
LU-14603 ptlrpc: quiet messages for unsupported opcodes 60/43260/3
authorAndreas Dilger <adilger@whamcloud.com>
Sun, 11 Apr 2021 02:04:30 +0000 (20:04 -0600)
committerOleg Drokin <green@whamcloud.com>
Sun, 16 May 2021 22:07:35 +0000 (22:07 +0000)
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 <adilger@whamcloud.com>
Change-Id: I35496168e3aa29ecb06076654ef0aa97ba2540e5
Reviewed-on: https://review.whamcloud.com/43260
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/include/uapi/linux/lustre/lustre_idl.h
lustre/target/tgt_handler.c

index c1fd62d..da92408 100644 (file)
@@ -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
 
index 4386cd7..2178966 100644 (file)
@@ -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));
        }