From 7ec56e2628a908343c9c60396e63f8e7093821b5 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Tue, 18 Dec 2012 01:42:25 +0800 Subject: [PATCH] LU-2148 kernel: Kernel update for latest FC18 kernel Add fc18 support for build system Signed-off-by: yang sheng Change-Id: Iaeb24b5e44f969eb23a55d115b866c926b25bd55 Reviewed-on: http://review.whamcloud.com/5194 Reviewed-by: Bobi Jam Tested-by: Hudson Reviewed-by: Brian J. Murrell Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- build/funcs.sh | 1 + build/lbuild-fc18 | 16 ++++++++++++++++ lustre.spec.in | 2 ++ lustre/autoconf/lustre-core.m4 | 2 ++ lustre/include/linux/lustre_compat25.h | 2 +- lustre/kernel_patches/targets/3.x-fc18.target.in | 14 ++++++++++++++ lustre/lmv/lmv_obd.c | 3 --- lustre/obdclass/cl_lock.c | 2 -- 8 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 build/lbuild-fc18 create mode 100644 lustre/kernel_patches/targets/3.x-fc18.target.in diff --git a/build/funcs.sh b/build/funcs.sh index 0a1571f2..bbd7709 100644 --- a/build/funcs.sh +++ b/build/funcs.sh @@ -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 index 0000000..a994938 --- /dev/null +++ b/build/lbuild-fc18 @@ -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" + +} diff --git a/lustre.spec.in b/lustre.spec.in index 6a8ec1b..5d02349 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -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 <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); diff --git a/lustre/obdclass/cl_lock.c b/lustre/obdclass/cl_lock.c index a3f15b7..a796d7e 100644 --- a/lustre/obdclass/cl_lock.c +++ b/lustre/obdclass/cl_lock.c @@ -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); -- 1.8.3.1