From 3a1e40d92baeb54fa93d527af55105a1e3a4a289 Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" Date: Fri, 9 Nov 2012 18:06:29 -0800 Subject: [PATCH] LU-1606 api: Do not include lustre_idl.h from lustreapi.h lustre_idl.h has become increasingly difficult to use from user-space. Normal users of the lustre api should not be looking into lustre wire protocol anyway, so this change eliminates the include of lustre_idl.h. After removing lustre_idl.h, it became obvious that a number of programs have been picking up normal user-space headers through a very windy path of includes. With the include of lustre_idl.h gone, they no longer compiled, so we also add the missing explicit includes. It became clear that copytool.c explicity requires libcfs/libcfs.h, and lustre_rsync.c require lustre_idl.h. But I believe that it is far better to have those includes explicitly stated, so it is obvious that those programs are peeking into lustre's internals. In the future we can work on creating new lustre API calls that provide the information that they need without side-stepping abstraction layers. Change-Id: I8ce55ffe0e1766515061f3dbc63c2372d5713f58 Signed-off-by: Christopher J. Morrone Reviewed-on: http://review.whamcloud.com/4505 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Richard Henwood Reviewed-by: Andreas Dilger Reviewed-by: Yu Jian Tested-by: Yu Jian --- lustre/include/lustre/lustreapi.h | 1 - lustre/tests/copytool.c | 5 +++++ lustre/tests/multiop.c | 1 + lustre/tests/sendfile.c | 2 ++ lustre/utils/lustre_rsync.c | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lustre/include/lustre/lustreapi.h b/lustre/include/lustre/lustreapi.h index 3abe2c8..3dc0f6c 100644 --- a/lustre/include/lustre/lustreapi.h +++ b/lustre/include/lustre/lustreapi.h @@ -43,7 +43,6 @@ */ #include -#include typedef void (*llapi_cb_t)(char *obd_type_name, char *obd_name, char *obd_uuid, void *args); diff --git a/lustre/tests/copytool.c b/lustre/tests/copytool.c index 36e86cc..f89e61d 100644 --- a/lustre/tests/copytool.c +++ b/lustre/tests/copytool.c @@ -45,9 +45,14 @@ */ #include +#include #include #include +#include +#include +#include +#include #include void *ctdata; diff --git a/lustre/tests/multiop.c b/lustre/tests/multiop.c index 9ed0522..4c9899a 100644 --- a/lustre/tests/multiop.c +++ b/lustre/tests/multiop.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/lustre/tests/sendfile.c b/lustre/tests/sendfile.c index 0156425..e26c417 100644 --- a/lustre/tests/sendfile.c +++ b/lustre/tests/sendfile.c @@ -36,6 +36,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/lustre/utils/lustre_rsync.c b/lustre/utils/lustre_rsync.c index c05a19e..2e50a87 100644 --- a/lustre/utils/lustre_rsync.c +++ b/lustre/utils/lustre_rsync.c @@ -121,6 +121,7 @@ #include #include +#include #include "lustre_rsync.h" #define REPLICATE_STATUS_VER 1 -- 1.8.3.1