From patchwork Thu Feb 27 21:14:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11410485 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9B38138D for ; Thu, 27 Feb 2020 21:39:37 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D28A024690 for ; Thu, 27 Feb 2020 21:39:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D28A024690 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lustre-devel-bounces@lists.lustre.org Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 8135B349A20; Thu, 27 Feb 2020 13:32:16 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp3.ccs.ornl.gov (smtp3.ccs.ornl.gov [160.91.203.39]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id D31C921FE6E for ; Thu, 27 Feb 2020 13:20:28 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id 3C2B28F1B; Thu, 27 Feb 2020 16:18:18 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 3ACB447C; Thu, 27 Feb 2020 16:18:18 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Thu, 27 Feb 2020 16:14:48 -0500 Message-Id: <1582838290-17243-421-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> References: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 420/622] lustre: ptlrpc: Don't get jobid in body_v2 X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Patrick Farrell Some Lustre messages are still sent with ptlrpc_body_v2, which does not have space for the jobid. This results in errors like this when getting the jobid from these messages, which we do now that the jobid is in all RPC debug: LustreError: 6817:0:(pack_generic.c:425:lustre_msg_buf_v2()) msg 000000005c83b7a2 buffer[0] size 152 too small (required 184, opc=-1) While we should stop sending ptlrpc_body_v2 messages, we we still have to support these messages from older servers. So put a check in lustre_msg_get_jobid so it won't try to get the jobid if it's the old, smaller RPC body. Fixes: 9eabc4eaba47 ("lustre: ptlrpc: Add jobid to rpctrace debug messages") WC-bug-id: https://jira.whamcloud.com/browse/LU-12523 Lustre-commit: 544701a782fb ("LU-12523 ptlrpc: Don't get jobid in body_v2") Signed-off-by: Patrick Farrell Reviewed-on: https://review.whamcloud.com/35584 Reviewed-by: Ann Koehler Reviewed-by: Andreas Dilger Reviewed-by: Shaun Tancheff Signed-off-by: James Simmons --- fs/lustre/ptlrpc/client.c | 4 ++-- fs/lustre/ptlrpc/pack_generic.c | 3 ++- fs/lustre/ptlrpc/service.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/lustre/ptlrpc/client.c b/fs/lustre/ptlrpc/client.c index bd641cc..9920a95 100644 --- a/fs/lustre/ptlrpc/client.c +++ b/fs/lustre/ptlrpc/client.c @@ -1644,7 +1644,7 @@ static int ptlrpc_send_new_req(struct ptlrpc_request *req) imp->imp_obd->obd_uuid.uuid, lustre_msg_get_status(req->rq_reqmsg), req->rq_xid, obd_import_nid2str(imp), lustre_msg_get_opc(req->rq_reqmsg), - lustre_msg_get_jobid(req->rq_reqmsg)); + lustre_msg_get_jobid(req->rq_reqmsg) ?: ""); rc = ptl_send_rpc(req, 0); if (rc == -ENOMEM) { @@ -2065,7 +2065,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set) req->rq_xid, obd_import_nid2str(imp), lustre_msg_get_opc(req->rq_reqmsg), - lustre_msg_get_jobid(req->rq_reqmsg)); + lustre_msg_get_jobid(req->rq_reqmsg) ?: ""); spin_lock(&imp->imp_lock); /* diff --git a/fs/lustre/ptlrpc/pack_generic.c b/fs/lustre/ptlrpc/pack_generic.c index 7acb4a8..b066113 100644 --- a/fs/lustre/ptlrpc/pack_generic.c +++ b/fs/lustre/ptlrpc/pack_generic.c @@ -2429,7 +2429,8 @@ void _debug_req(struct ptlrpc_request *req, DEBUG_REQ_FLAGS(req), req_ok ? lustre_msg_get_flags(req->rq_reqmsg) : -1, rep_flags, req->rq_status, rep_status, - req_ok ? lustre_msg_get_jobid(req->rq_reqmsg) : ""); + req_ok ? lustre_msg_get_jobid(req->rq_reqmsg) ?: "" + : ""); va_end(args); } EXPORT_SYMBOL(_debug_req); diff --git a/fs/lustre/ptlrpc/service.c b/fs/lustre/ptlrpc/service.c index 3132a1e..f40cb8d 100644 --- a/fs/lustre/ptlrpc/service.c +++ b/fs/lustre/ptlrpc/service.c @@ -1765,7 +1765,7 @@ static int ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt, lustre_msg_get_status(request->rq_reqmsg), request->rq_xid, libcfs_id2str(request->rq_peer), lustre_msg_get_opc(request->rq_reqmsg), - lustre_msg_get_jobid(request->rq_reqmsg)); + lustre_msg_get_jobid(request->rq_reqmsg) ?: ""); if (lustre_msg_get_opc(request->rq_reqmsg) != OBD_PING) CFS_FAIL_TIMEOUT_MS(OBD_FAIL_PTLRPC_PAUSE_REQ, cfs_fail_val); @@ -1807,7 +1807,7 @@ static int ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt, request->rq_xid, libcfs_id2str(request->rq_peer), lustre_msg_get_opc(request->rq_reqmsg), - lustre_msg_get_jobid(request->rq_reqmsg), + lustre_msg_get_jobid(request->rq_reqmsg) ?: "", timediff_usecs, arrived_usecs, (request->rq_repmsg ?