From 7446b87524ba992b96b90a508a51d48d86b90865 Mon Sep 17 00:00:00 2001 From: Liu Xuezhao Date: Sun, 18 Mar 2012 23:08:37 +0800 Subject: [PATCH] LU-1214 ptlrpc: removes client lu_target.h/target.c dependency Needs not include lu_target.h or compile target.c for client. Signed-off-by: Liu Xuezhao Change-Id: I332864158839a8ed1f1df3b24477f5e68ef4ecb7 Reviewed-on: http://review.whamcloud.com/2362 Tested-by: Maloo Tested-by: Hudson Reviewed-by: Andreas Dilger Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- lustre/fid/fid_handler.c | 1 - lustre/include/obd.h | 6 +++++- lustre/include/obd_class.h | 2 ++ lustre/ptlrpc/Makefile.in | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lustre/fid/fid_handler.c b/lustre/fid/fid_handler.c index 140e154..72159e8 100644 --- a/lustre/fid/fid_handler.c +++ b/lustre/fid/fid_handler.c @@ -56,7 +56,6 @@ #include #include -#include #include #include #include diff --git a/lustre/include/obd.h b/lustre/include/obd.h index b579fca..6cdd2bb 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -59,7 +59,9 @@ #define IOC_MDC_MAX_NR 50 #include -#include +#ifdef HAVE_SERVER_SUPPORT +# include +#endif #include #include #include @@ -294,7 +296,9 @@ struct obd_device_target { struct super_block *obt_sb; /** last_rcvd file */ struct file *obt_rcvd_filp; +#ifdef HAVE_SERVER_SUPPORT struct lu_target *obt_lut; +#endif __u64 obt_mount_count; cfs_semaphore_t obt_quotachecking; struct lustre_quota_ctxt obt_qctxt; diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 6a2a7de..433431f 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -302,6 +302,7 @@ static inline enum obd_option exp_flags_from_obd(struct obd_device *obd) 0); } +#ifdef HAVE_SERVER_SUPPORT static inline struct lu_target *class_exp2tgt(struct obd_export *exp) { LASSERT(exp->exp_obd); @@ -313,6 +314,7 @@ static inline struct lr_server_data *class_server_data(struct obd_device *obd) LASSERT(obd->u.obt.obt_lut); return &obd->u.obt.obt_lut->lut_lsd; } +#endif void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid); void obdo_to_ioobj(struct obdo *oa, struct obd_ioobj *ioobj); diff --git a/lustre/ptlrpc/Makefile.in b/lustre/ptlrpc/Makefile.in index a0ccb07..9a2e0ca 100644 --- a/lustre/ptlrpc/Makefile.in +++ b/lustre/ptlrpc/Makefile.in @@ -13,7 +13,9 @@ ptlrpc_objs += events.o ptlrpc_module.o service.o pinger.o recov_thread.o ptlrpc_objs += llog_net.o llog_client.o llog_server.o import.o ptlrpcd.o ptlrpc_objs += pers.o lproc_ptlrpc.o wiretest.o layout.o ptlrpc_objs += sec.o sec_bulk.o sec_gc.o sec_config.o sec_lproc.o -ptlrpc_objs += sec_null.o sec_plain.o target.o +ptlrpc_objs += sec_null.o sec_plain.o + +@SERVER_TRUE@ptlrpc_objs += target.o ptlrpc-objs := $(ldlm_objs) $(ptlrpc_objs) -- 1.8.3.1