Whamcloud - gitweb
LU-12523 ptlrpc: Don't get jobid in body_v2 84/35584/10
authorPatrick Farrell <pfarrell@whamcloud.com>
Mon, 22 Jul 2019 18:16:12 +0000 (14:16 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 9 Aug 2019 04:41:27 +0000 (04:41 +0000)
commit544701a782fba39f669e5d764be36755073a1a9a
tree5e07fc3621371ea09cb796a0db59e50950427273
parentf6819c90c8532e017646c8173337a9c92250e60f
LU-12523 ptlrpc: Don't get jobid in body_v2

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: 9ae40e4c5ecb ("LU-12523 ptlrpc: Add jobid to rpctrace debug messages")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I8af3c7cd921c7448ed12fdd30d1e48b2ccc89fdc
Reviewed-on: https://review.whamcloud.com/35584
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Ann Koehler <amk@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ptlrpc/client.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/service.c