From 7a8fafe2a10674dae7dc490c45d7bd2e49e1926e Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Thu, 29 Oct 2020 15:01:35 +1100 Subject: [PATCH] LU-14291 lustre: only include nrs headers when needed Various lustre_nrs_*.h header are only needed on the server. Make this explicit, so it is easier to see which files are needed on the client. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: I9bc30acc4f62ea9af516055edbb7833919811089 Reviewed-on: https://review.whamcloud.com/41128 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/include/lustre_nrs.h | 4 ++++ lustre/ldlm/ldlm_resource.c | 1 + lustre/obdclass/lu_object.c | 1 + 3 files changed, 6 insertions(+) diff --git a/lustre/include/lustre_nrs.h b/lustre/include/lustre_nrs.h index bafbc7e..8223c08 100644 --- a/lustre/include/lustre_nrs.h +++ b/lustre/include/lustre_nrs.h @@ -672,9 +672,11 @@ enum { }; #include +#ifdef HAVE_SERVER_SUPPORT #include #include #include +#endif /* HAVE_SERVER_SUPPORT */ #include /** @@ -712,6 +714,7 @@ struct ptlrpc_nrs_request { * Fields for the FIFO policy */ struct nrs_fifo_req fifo; +#ifdef HAVE_SERVER_SUPPORT /** * CRR-N request defintion */ @@ -722,6 +725,7 @@ struct ptlrpc_nrs_request { * TBF request definition */ struct nrs_tbf_req tbf; +#endif /* HAVE_SERVER_SUPPORT */ /** * Fields for the delay policy */ diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c index 1deddc9..ea6e751 100644 --- a/lustre/ldlm/ldlm_resource.c +++ b/lustre/ldlm/ldlm_resource.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "ldlm_internal.h" struct kmem_cache *ldlm_resource_slab, *ldlm_lock_slab; diff --git a/lustre/obdclass/lu_object.c b/lustre/obdclass/lu_object.c index 8847a4e..264caca 100644 --- a/lustre/obdclass/lu_object.c +++ b/lustre/obdclass/lu_object.c @@ -48,6 +48,7 @@ #include #include +#include #include #include #include -- 1.8.3.1