Whamcloud - gitweb
LU-2148 kernel: Kernel update for latest FC18 kernel
authoryangsheng <ys@whamcloud.com>
Mon, 17 Dec 2012 17:42:25 +0000 (01:42 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 11 Mar 2013 16:25:41 +0000 (12:25 -0400)
Add fc18 support for build system

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Iaeb24b5e44f969eb23a55d115b866c926b25bd55
Reviewed-on: http://review.whamcloud.com/5194
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
build/funcs.sh
build/lbuild-fc18 [new file with mode: 0644]
lustre.spec.in
lustre/autoconf/lustre-core.m4
lustre/include/linux/lustre_compat25.h
lustre/kernel_patches/targets/3.x-fc18.target.in [new file with mode: 0644]
lustre/lmv/lmv_obd.c
lustre/obdclass/cl_lock.c

index 0a1571f..bbd7709 100644 (file)
@@ -186,6 +186,7 @@ autodetect_target() {
         sles10) target="2.6-sles10";;
         sles11) target="$(uname -r | cut -d . -f 1,2)-sles11";;
           fc15) target="2.6-fc15";;
+          fc18) target="3.x-fc18";;
             *) fatal 1 "I don't know what distro $distro is.\nEither update autodetect_target() or use the --target argument.";;
     esac
 
diff --git a/build/lbuild-fc18 b/build/lbuild-fc18
new file mode 100644 (file)
index 0000000..a994938
--- /dev/null
@@ -0,0 +1,16 @@
+# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
+
+source ${0%/*}/lbuild-fc
+
+# increment this if you have made a change that should force a new kernel
+# to build built
+BUILD_GEN+=".0"
+
+find_linux_rpm-fc18() {
+    local prefix="$1"
+    local wanted_kernel="$2"
+    local pathtorpms=${3:-"${KERNELRPMSBASE}/${lnxmaj}/${DISTRO}/${TARGET_ARCH}"}
+
+    find_linux_rpm-rhel "$prefix" "$wanted_kernel" "$pathtorpms"
+
+}
index 6a8ec1b..5d02349 100644 (file)
@@ -258,6 +258,8 @@ rm -f lustre-source
 ln -s $RPM_BUILD_ROOT/usr/src lustre-source
 make distdir distdir=lustre-source/lustre-%{version}
 chmod -R go-w lustre-source/lustre-%{version}
+# fc18 needs 'x' permission for library files
+find $RPM_BUILD_ROOT -name '*.so' | xargs chmod +x
 
 cat >lustre.files <<EOF
 %attr(-, root, root) /sbin/mount.lustre
index f290ea2..08f5e29 100644 (file)
@@ -2384,6 +2384,7 @@ AC_DEFUN([LC_PROG_LINUX],
         # 3.5
         LC_HAVE_CLEAR_INODE
         LC_HAVE_ENCODE_FH_PARENT
+        LC_FILE_LLSEEK_SIZE_5ARG
 
         # 3.6
         LC_HAVE_DENTRY_D_ALIAS_HLIST
@@ -2866,6 +2867,7 @@ lustre/kernel_patches/targets/2.6-oel5.target
 lustre/kernel_patches/targets/2.6-fc11.target
 lustre/kernel_patches/targets/2.6-fc12.target
 lustre/kernel_patches/targets/2.6-fc15.target
+lustre/kernel_patches/targets/3.x-fc18.target
 lustre/ldlm/Makefile
 lustre/fid/Makefile
 lustre/fid/autoMakefile
index e300597..d25c168 100644 (file)
@@ -168,7 +168,7 @@ static inline struct file *ll_dentry_open(struct dentry *dentry,
 
 #endif
 
-#if !defined(HAVE_FILE_LLSEEK_SIZE) || defined(HAVE_FILE_LLSEEK_5ARGS)
+#if !defined(HAVE_FILE_LLSEEK_SIZE) || defined(HAVE_FILE_LLSEEK_SIZE_5ARGS)
 #define ll_generic_file_llseek_size(file, offset, origin, maxbytes, eof) \
                generic_file_llseek_size(file, offset, origin, maxbytes, eof);
 #else
diff --git a/lustre/kernel_patches/targets/3.x-fc18.target.in b/lustre/kernel_patches/targets/3.x-fc18.target.in
new file mode 100644 (file)
index 0000000..84c47c4
--- /dev/null
@@ -0,0 +1,14 @@
+lnxmaj="3.6.10"
+lnxrel="4.fc18"
+
+KERNEL_SRPM=kernel-${lnxmaj}-${lnxrel}.src.rpm
+SERIES=""
+EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
+LUSTRE_VERSION=@VERSION@
+BASE_ARCHS="i686 x86_64"
+BIGMEM_ARCHS=""
+BOOT_ARCHS=""
+JENSEN_ARCHS=""
+SMP_ARCHS=""
+UP_ARCHS=""
+
index ba5962e..cdb3d61 100644 (file)
@@ -344,7 +344,6 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
 #endif
         struct lmv_obd          *lmv = &obd->u.lmv;
         struct obd_uuid         *cluuid = &lmv->cluuid;
-        struct obd_connect_data *mdc_data = NULL;
         struct obd_uuid          lmv_mdc_uuid = { "LMV_MDC_UUID" };
         struct obd_device       *mdc_obd;
         struct obd_export       *mdc_exp;
@@ -389,8 +388,6 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
 
         fld_client_add_target(&lmv->lmv_fld, &target);
 
-        mdc_data = &class_exp2cliimp(mdc_exp)->imp_connect_data;
-
         rc = obd_register_observer(mdc_obd, obd);
         if (rc) {
                 obd_disconnect(mdc_exp);
index a3f15b7..a796d7e 100644 (file)
@@ -305,13 +305,11 @@ static void cl_lock_free(const struct lu_env *env, struct cl_lock *lock)
 void cl_lock_put(const struct lu_env *env, struct cl_lock *lock)
 {
         struct cl_object        *obj;
-        struct cl_site          *site;
 
         LINVRNT(cl_lock_invariant(env, lock));
         ENTRY;
         obj = lock->cll_descr.cld_obj;
         LINVRNT(obj != NULL);
-        site = cl_object_site(obj);
 
         CDEBUG(D_TRACE, "releasing reference: %d %p %lu\n",
                cfs_atomic_read(&lock->cll_ref), lock, RETIP);