From 12c34651994b77ac0cf231cd710f9d511845a4e1 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Fri, 10 Mar 2023 09:12:27 -0500 Subject: [PATCH] LU-14291 batch: don't include lustre_update.h for client only builds The header lustre_update.h contains a huge amount of server only code. Remove lustre_update.h for a client only build and include only what we need for client directly. Test-Parameters: trivial Change-Id: I84dc39672340045bde09249d98f32aa9abec63b8 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50258 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Qian Yingjin Reviewed-by: Oleg Drokin --- lustre/mdc/mdc_batch.c | 1 - lustre/ptlrpc/batch.c | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lustre/mdc/mdc_batch.c b/lustre/mdc/mdc_batch.c index f7dab0a..e37a91e 100644 --- a/lustre/mdc/mdc_batch.c +++ b/lustre/mdc/mdc_batch.c @@ -36,7 +36,6 @@ #define DEBUG_SUBSYSTEM S_MDC #include -#include #include #include "mdc_internal.h" diff --git a/lustre/ptlrpc/batch.c b/lustre/ptlrpc/batch.c index 18b8796..0cc8f88 100644 --- a/lustre/ptlrpc/batch.c +++ b/lustre/ptlrpc/batch.c @@ -36,8 +36,24 @@ #define DEBUG_SUBSYSTEM S_MDC #include -#include #include +#ifdef HAVE_SERVER_SUPPORT +#include +#else + +#define OUT_UPDATE_REPLY_SIZE 4096 + +static inline struct lustre_msg * +batch_update_repmsg_next(struct batch_update_reply *bur, + struct lustre_msg *repmsg) +{ + if (repmsg) + return (struct lustre_msg *)((char *)repmsg + + lustre_packed_msg_size(repmsg)); + else + return &bur->burp_repmsg[0]; +} +#endif struct batch_update_buffer { struct batch_update_request *bub_req; -- 1.8.3.1