[001/151] lnet: fix needed headers for lnet headers
diff mbox series

Message ID 1569869810-23848-2-git-send-email-jsimmons@infradead.org
State New
Headers show
Series
  • lustre: update to 2.11 support
Related show

Commit Message

James Simmons Sept. 30, 2019, 6:54 p.m. UTC
The linux kernel now has a sanity check for the global headers,
activated by  CONFIG_HEADER_TEST=y and CONFIG_KERNEL_HEADER_TEST=y.
Some LNet headers are missing a few headers to allow them to build
properly.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
---
 include/linux/libcfs/libcfs_fail.h    | 1 +
 include/linux/libcfs/libcfs_private.h | 3 +++
 include/uapi/linux/lnet/lnetst.h      | 2 ++
 3 files changed, 6 insertions(+)

Comments

NeilBrown Oct. 1, 2019, 7:24 a.m. UTC | #1
On Mon, Sep 30 2019, James Simmons wrote:

> The linux kernel now has a sanity check for the global headers,
> activated by  CONFIG_HEADER_TEST=y and CONFIG_KERNEL_HEADER_TEST=y.
> Some LNet headers are missing a few headers to allow them to build
> properly.
>
> Signed-off-by: James Simmons <jsimmons@infradead.org>
> Signed-off-by: NeilBrown <neilb@suse.com>

I've added the following to this patch

diff --git a/include/linux/libcfs/libcfs_debug.h b/include/linux/libcfs/libcfs_debug.h
index 911fd35b81b5..2ae67c67faa7 100644
--- a/include/linux/libcfs/libcfs_debug.h
+++ b/include/linux/libcfs/libcfs_debug.h
@@ -56,6 +56,8 @@ extern unsigned int libcfs_console_backoff;
 extern unsigned int libcfs_debug_binary;
 extern char libcfs_debug_file_path_arr[PATH_MAX];
 
+struct task_struct;
+
 int libcfs_debug_mask2str(char *str, int size, int mask, int is_subsys);
 int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys);
 void libcfs_debug_dumpstack(struct task_struct *tsk);


NeilBrown
James Simmons Oct. 1, 2019, 5:52 p.m. UTC | #2
> On Mon, Sep 30 2019, James Simmons wrote:
> 
> > The linux kernel now has a sanity check for the global headers,
> > activated by  CONFIG_HEADER_TEST=y and CONFIG_KERNEL_HEADER_TEST=y.
> > Some LNet headers are missing a few headers to allow them to build
> > properly.
> >
> > Signed-off-by: James Simmons <jsimmons@infradead.org>
> > Signed-off-by: NeilBrown <neilb@suse.com>
> 
> I've added the following to this patch
> 
> diff --git a/include/linux/libcfs/libcfs_debug.h b/include/linux/libcfs/libcfs_debug.h
> index 911fd35b81b5..2ae67c67faa7 100644
> --- a/include/linux/libcfs/libcfs_debug.h
> +++ b/include/linux/libcfs/libcfs_debug.h
> @@ -56,6 +56,8 @@ extern unsigned int libcfs_console_backoff;
>  extern unsigned int libcfs_debug_binary;
>  extern char libcfs_debug_file_path_arr[PATH_MAX];
>  
> +struct task_struct;
> +
>  int libcfs_debug_mask2str(char *str, int size, int mask, int is_subsys);
>  int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys);
>  void libcfs_debug_dumpstack(struct task_struct *tsk);
> 
> 
> NeilBrown

Acked-by: James Simmons <jsimmons@infradead.org>

Patch
diff mbox series

diff --git a/include/linux/libcfs/libcfs_fail.h b/include/linux/libcfs/libcfs_fail.h
index 0e73eef..f52a82a 100644
--- a/include/linux/libcfs/libcfs_fail.h
+++ b/include/linux/libcfs/libcfs_fail.h
@@ -35,6 +35,7 @@ 
 
 #include <linux/sched.h>
 #include <linux/wait.h>
+#include <linux/libcfs/libcfs_debug.h>
 
 extern unsigned long cfs_fail_loc;
 extern unsigned int cfs_fail_val;
diff --git a/include/linux/libcfs/libcfs_private.h b/include/linux/libcfs/libcfs_private.h
index 515fd63..2e8cff6 100644
--- a/include/linux/libcfs/libcfs_private.h
+++ b/include/linux/libcfs/libcfs_private.h
@@ -39,6 +39,9 @@ 
 #ifndef __LIBCFS_PRIVATE_H__
 #define __LIBCFS_PRIVATE_H__
 
+#include <linux/sched.h>
+#include <linux/libcfs/libcfs_debug.h>
+
 #ifndef DEBUG_SUBSYSTEM
 # define DEBUG_SUBSYSTEM S_UNDEFINED
 #endif
diff --git a/include/uapi/linux/lnet/lnetst.h b/include/uapi/linux/lnet/lnetst.h
index 27fcd91..449c5e6 100644
--- a/include/uapi/linux/lnet/lnetst.h
+++ b/include/uapi/linux/lnet/lnetst.h
@@ -38,6 +38,8 @@ 
 #define __LNET_ST_H__
 
 #include <linux/types.h>
+#include <linux/time.h>
+#include <linux/lnet/lnet-types.h>
 
 #define LST_FEAT_NONE		(0)
 #define LST_FEAT_BULK_LEN	(1 << 0)	/* enable variable page size */