Whamcloud - gitweb
LU-2675 lmv: remove liblustre includes 95/10195/2
authorJohn L. Hammond <john.hammond@intel.com>
Thu, 1 May 2014 11:13:15 +0000 (06:13 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 16 Jul 2014 02:28:42 +0000 (02:28 +0000)
Remove liblustre includes in lmv/. Always assume a kernel build.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia0e61d11cb8238e362e934a7d424b9e768e713fe
Reviewed-on: http://review.whamcloud.com/10195
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lmv/autoMakefile.am
lustre/lmv/lmv_fld.c
lustre/lmv/lmv_intent.c
lustre/lmv/lmv_obd.c

index 823c680..7e76824 100644 (file)
 # Lustre is a trademark of Sun Microsystems, Inc.
 #
 
 # 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
 if MODULES
 modulefs_DATA = lmv$(KMODEXT)
 endif # MODULES
index 1874f17..9f97d75 100644 (file)
@@ -35,7 +35,6 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LMV
  */
 
 #define DEBUG_SUBSYSTEM S_LMV
-#ifdef __KERNEL__
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -43,9 +42,6 @@
 #include <linux/pagemap.h>
 #include <linux/math64.h>
 #include <linux/seq_file.h>
 #include <linux/pagemap.h>
 #include <linux/math64.h>
 #include <linux/seq_file.h>
-#else
-#include <liblustre.h>
-#endif
 
 #include <obd_support.h>
 #include <lustre/lustre_idl.h>
 
 #include <obd_support.h>
 #include <lustre/lustre_idl.h>
index 061025d..212a8b2 100644 (file)
@@ -35,7 +35,6 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LMV
  */
 
 #define DEBUG_SUBSYSTEM S_LMV
-#ifdef __KERNEL__
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -45,9 +44,6 @@
 #include <linux/seq_file.h>
 #include <linux/namei.h>
 #include <linux/lustre_intent.h>
 #include <linux/seq_file.h>
 #include <linux/namei.h>
 #include <linux/lustre_intent.h>
-#else
-#include <liblustre.h>
-#endif
 
 #include <obd_support.h>
 #include <lustre/lustre_idl.h>
 
 #include <obd_support.h>
 #include <lustre/lustre_idl.h>
@@ -156,7 +152,6 @@ out:
        return rc;
 }
 
        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,
 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);
 }
 
        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)
 
 /*
  * IT_OPEN is intended to open (and create, possible) an object. Parent (pid)
index d18b856..934eaaf 100644 (file)
@@ -35,7 +35,6 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LMV
  */
 
 #define DEBUG_SUBSYSTEM S_LMV
-#ifdef __KERNEL__
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -45,9 +44,6 @@
 #include <linux/math64.h>
 #include <linux/seq_file.h>
 #include <linux/namei.h>
 #include <linux/math64.h>
 #include <linux/seq_file.h>
 #include <linux/namei.h>
-#else
-#include <liblustre.h>
-#endif
 
 #include <lustre/lustre_idl.h>
 #include <obd_support.h>
 
 #include <lustre/lustre_idl.h>
 #include <obd_support.h>
@@ -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) {
        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
                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);
                }
                              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;
                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)
 {
 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++) {
        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);
        }
                if (attr->cat_mtime < LTIME_S(inode->i_mtime))
                        attr->cat_mtime = LTIME_S(inode->i_mtime);
        }
-#endif
        return 0;
 }
 
        return 0;
 }
 
@@ -3692,7 +3684,6 @@ int __init lmv_init(void)
                                   LUSTRE_LMV_NAME, NULL);
 }
 
                                   LUSTRE_LMV_NAME, NULL);
 }
 
-#ifdef __KERNEL__
 static void lmv_exit(void)
 {
         class_unregister_type(LUSTRE_LMV_NAME);
 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);
 
 module_init(lmv_init);
 module_exit(lmv_exit);
-#endif