From e15e92d314be7ac13737b5d351695a4e21c4655f Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Thu, 1 May 2014 06:13:15 -0500 Subject: [PATCH] LU-2675 lmv: remove liblustre includes Remove liblustre includes in lmv/. Always assume a kernel build. Signed-off-by: John L. Hammond Change-Id: Ia0e61d11cb8238e362e934a7d424b9e768e713fe Reviewed-on: http://review.whamcloud.com/10195 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/lmv/autoMakefile.am | 7 ------- lustre/lmv/lmv_fld.c | 4 ---- lustre/lmv/lmv_intent.c | 16 ---------------- lustre/lmv/lmv_obd.c | 10 ---------- 4 files changed, 37 deletions(-) diff --git a/lustre/lmv/autoMakefile.am b/lustre/lmv/autoMakefile.am index 823c680..7e76824 100644 --- a/lustre/lmv/autoMakefile.am +++ b/lustre/lmv/autoMakefile.am @@ -36,13 +36,6 @@ # Lustre is a trademark of Sun Microsystems, Inc. # -if LIBLUSTRE -noinst_LIBRARIES = liblmv.a -liblmv_a_SOURCES = lmv_obd.c lmv_intent.c lmv_fld.c -liblmv_a_CPPFLAGS = $(LLCPPFLAGS) -liblmv_a_CFLAGS = $(LLCFLAGS) -endif - if MODULES modulefs_DATA = lmv$(KMODEXT) endif # MODULES diff --git a/lustre/lmv/lmv_fld.c b/lustre/lmv/lmv_fld.c index 1874f17..9f97d75 100644 --- a/lustre/lmv/lmv_fld.c +++ b/lustre/lmv/lmv_fld.c @@ -35,7 +35,6 @@ */ #define DEBUG_SUBSYSTEM S_LMV -#ifdef __KERNEL__ #include #include #include @@ -43,9 +42,6 @@ #include #include #include -#else -#include -#endif #include #include diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index 061025d..212a8b2 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -35,7 +35,6 @@ */ #define DEBUG_SUBSYSTEM S_LMV -#ifdef __KERNEL__ #include #include #include @@ -45,9 +44,6 @@ #include #include #include -#else -#include -#endif #include #include @@ -156,7 +152,6 @@ out: return rc; } -#ifdef __KERNEL__ int lmv_revalidate_slaves(struct obd_export *exp, struct mdt_body *mbody, struct lmv_stripe_md *lsm, ldlm_blocking_callback cb_blocking, @@ -306,17 +301,6 @@ cleanup: RETURN(rc); } -#else - -int lmv_revalidate_slaves(struct obd_export *exp, struct mdt_body *mbody, - struct lmv_stripe_md *lsm, - ldlm_blocking_callback cb_blocking, - int extra_lock_flags) -{ - return 0; -} - -#endif /* * IT_OPEN is intended to open (and create, possible) an object. Parent (pid) diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index d18b856..934eaaf 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -35,7 +35,6 @@ */ #define DEBUG_SUBSYSTEM S_LMV -#ifdef __KERNEL__ #include #include #include @@ -45,9 +44,6 @@ #include #include #include -#else -#include -#endif #include #include @@ -3130,7 +3126,6 @@ int lmv_unpack_md(struct obd_export *exp, struct lmv_stripe_md **lsmp, lsm = *lsmp; /* Free memmd */ if (lsm != NULL && lmm == NULL) { -#ifdef __KERNEL__ int i; for (i = 0; i < lsm->lsm_md_stripe_count; i++) { /* For migrating inode, the master stripe and master @@ -3140,7 +3135,6 @@ int lmv_unpack_md(struct obd_export *exp, struct lmv_stripe_md **lsmp, i == 0) && lsm->lsm_md_oinfo[i].lmo_root != NULL) iput(lsm->lsm_md_oinfo[i].lmo_root); } -#endif lsm_size = lmv_stripe_md_size(lsm->lsm_md_stripe_count); OBD_FREE(lsm, lsm_size); *lsmp = NULL; @@ -3593,7 +3587,6 @@ int lmv_update_lsm_md(struct obd_export *exp, struct lmv_stripe_md *lsm, int lmv_merge_attr(struct obd_export *exp, const struct lmv_stripe_md *lsm, struct cl_attr *attr) { -#ifdef __KERNEL__ int i; for (i = 0; i < lsm->lsm_md_stripe_count; i++) { @@ -3622,7 +3615,6 @@ int lmv_merge_attr(struct obd_export *exp, const struct lmv_stripe_md *lsm, if (attr->cat_mtime < LTIME_S(inode->i_mtime)) attr->cat_mtime = LTIME_S(inode->i_mtime); } -#endif return 0; } @@ -3692,7 +3684,6 @@ int __init lmv_init(void) LUSTRE_LMV_NAME, NULL); } -#ifdef __KERNEL__ static void lmv_exit(void) { class_unregister_type(LUSTRE_LMV_NAME); @@ -3704,4 +3695,3 @@ MODULE_LICENSE("GPL"); module_init(lmv_init); module_exit(lmv_exit); -#endif -- 1.8.3.1