Whamcloud - gitweb
LU-1214 ptlrpc: removes client lu_target.h/target.c dependency
authorLiu Xuezhao <xuezhao.liu@emc.com>
Sun, 18 Mar 2012 15:08:37 +0000 (23:08 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 7 May 2012 18:52:05 +0000 (14:52 -0400)
Needs not include lu_target.h or compile target.c for client.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I332864158839a8ed1f1df3b24477f5e68ef4ecb7
Reviewed-on: http://review.whamcloud.com/2362
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/fid/fid_handler.c
lustre/include/obd.h
lustre/include/obd_class.h
lustre/ptlrpc/Makefile.in

index 140e154..72159e8 100644 (file)
@@ -56,7 +56,6 @@
 
 #include <obd.h>
 #include <obd_class.h>
-#include <lu_target.h>
 #include <dt_object.h>
 #include <md_object.h>
 #include <obd_support.h>
index b579fca..6cdd2bb 100644 (file)
@@ -59,7 +59,9 @@
 #define IOC_MDC_MAX_NR       50
 
 #include <lustre/lustre_idl.h>
-#include <lu_target.h>
+#ifdef HAVE_SERVER_SUPPORT
+# include <lu_target.h>
+#endif
 #include <lu_ref.h>
 #include <lustre_lib.h>
 #include <lustre_export.h>
@@ -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;
index 6a2a7de..433431f 100644 (file)
@@ -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);
index a0ccb07..9a2e0ca 100644 (file)
@@ -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)