Whamcloud - gitweb
LU-14291 batch: don't include lustre_update.h for client only builds 58/50258/2
authorJames Simmons <jsimmons@infradead.org>
Fri, 10 Mar 2023 14:12:27 +0000 (09:12 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 28 Mar 2023 22:18:09 +0000 (22:18 +0000)
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 <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50258
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdc/mdc_batch.c
lustre/ptlrpc/batch.c

index f7dab0a..e37a91e 100644 (file)
@@ -36,7 +36,6 @@
 #define DEBUG_SUBSYSTEM S_MDC
 
 #include <linux/module.h>
-#include <lustre_update.h>
 #include <lustre_acl.h>
 
 #include "mdc_internal.h"
index 18b8796..0cc8f88 100644 (file)
 #define DEBUG_SUBSYSTEM S_MDC
 
 #include <linux/module.h>
-#include <lustre_update.h>
 #include <obd.h>
+#ifdef HAVE_SERVER_SUPPORT
+#include <lustre_update.h>
+#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;