Whamcloud - gitweb
LU-14291 ptlrpc: format UPDATE messages in server-only code 25/41125/7
authorMr NeilBrown <neilb@suse.de>
Fri, 30 Oct 2020 04:01:00 +0000 (15:01 +1100)
committerOleg Drokin <green@whamcloud.com>
Tue, 6 Apr 2021 03:02:23 +0000 (03:02 +0000)
commit771308ada3895c3ccfeb8e63365089086c1d9fdc
tree2dc9534df4a197e435d5c96fba2671c215151d6e
parent67d17dd590f913643f5adc8aced369221faccf05
LU-14291 ptlrpc: format UPDATE messages in server-only code

There are some ptlrpc messages that are only used for targets to
communicate with each other: Object Updates between Targets (OUT).

These are never needed by the client, so the code for handling them
can be conditionally compiled with HAVE_SERVER_SUPPORT.

The code in layout.c needs struct declaration that are in the file, so
group them at the end of the file and add #ifdef.
The code in pack_generic.c can stand alone, so move it to a new
pack_server.c and compile that only when server code is requested.

For simplicity, also make req_check_sepol() completely server-side
and provide an inline stub for client-only code.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I788352575a2109df389760fff45207ad6de3391b
Reviewed-on: https://review.whamcloud.com/41125
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_req_layout.h
lustre/ptlrpc/Makefile.in
lustre/ptlrpc/layout.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/pack_server.c [new file with mode: 0644]