From 25f9f8d981e7a270c05caa06ada89c3dd1d6ce6e Mon Sep 17 00:00:00 2001 From: yangsheng Date: Tue, 4 Sep 2012 03:41:30 +0800 Subject: [PATCH] LU-1808 build: Lustre build does not support FC15. Change lbuild to support for FC15 and calm down warning message. Signed-off-by: yang sheng Change-Id: I365f708f82c01b0f72aeffa3c09e46800ca770d5 Reviewed-on: http://review.whamcloud.com/3849 Tested-by: Hudson Reviewed-by: Jinshan Xiong Reviewed-by: Chris Gearing Reviewed-by: Brian J. Murrell Tested-by: Maloo Reviewed-by: Oleg Drokin --- build/autoconf/lustre-build-linux.m4 | 4 ++-- build/funcs.sh | 4 ++++ build/lbuild-fc15 | 7 +++++++ libcfs/libcfs/workitem.c | 4 ++++ lnet/utils/lst.c | 2 -- lustre/autoconf/lustre-core.m4 | 1 + lustre/fld/lproc_fld.c | 3 --- lustre/kernel_patches/targets/2.6-fc15.target.in | 14 ++++++++++++++ lustre/llite/vvp_io.c | 3 +-- lustre/mdc/mdc_locks.c | 2 -- lustre/osc/osc_request.c | 2 +- lustre/tests/mpi/write_append_truncate.c | 3 +-- lustre/tests/mpi/write_disjoint.c | 5 +++-- snmp/lustre-snmp.c | 2 -- 14 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 build/lbuild-fc15 create mode 100644 lustre/kernel_patches/targets/2.6-fc15.target.in diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4 index 3d8656c..e74b180 100644 --- a/build/autoconf/lustre-build-linux.m4 +++ b/build/autoconf/lustre-build-linux.m4 @@ -232,8 +232,8 @@ LB_CHECK_FILE([$LINUX_CONFIG],[], # at 2.6.19 # $LINUX/include/linux/config.h is removed # and at more old has only one line # include -LB_CHECK_FILE([$LINUX_OBJ/include/linux/autoconf.h],[AUTOCONF_HDIR=linux], - [LB_CHECK_FILE([$LINUX_OBJ/include/generated/autoconf.h],[AUTOCONF_HDIR=generated], +LB_CHECK_FILE([$LINUX_OBJ/include/generated/autoconf.h],[AUTOCONF_HDIR=generated], + [LB_CHECK_FILE([$LINUX_OBJ/include/linux/autoconf.h],[AUTOCONF_HDIR=linux], [AC_MSG_ERROR([Run make config in $LINUX.])])]) AC_SUBST(AUTOCONF_HDIR) LB_CHECK_FILE([$LINUX_OBJ/include/linux/version.h],[], diff --git a/build/funcs.sh b/build/funcs.sh index 09292d0..268d84d 100644 --- a/build/funcs.sh +++ b/build/funcs.sh @@ -144,6 +144,9 @@ autodetect_distro() { "SUSE LINUX") name="sles" ;; + "Fedora") + name="fc" + ;; *) fatal 1 "I don't know what distro name $name and version $version is.\nEither update autodetect_distro() or use the --distro argument." ;; @@ -182,6 +185,7 @@ autodetect_target() { rhel6) target="2.6-rhel6";; sles10) target="2.6-sles10";; sles11) target="2.6-sles11";; + fc15) target="2.6-fc15";; *) 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-fc15 b/build/lbuild-fc15 new file mode 100644 index 0000000..0666d41 --- /dev/null +++ b/build/lbuild-fc15 @@ -0,0 +1,7 @@ +# 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" diff --git a/libcfs/libcfs/workitem.c b/libcfs/libcfs/workitem.c index 5bcab3f..3ae1f45 100644 --- a/libcfs/libcfs/workitem.c +++ b/libcfs/libcfs/workitem.c @@ -423,6 +423,8 @@ cfs_wi_sched_destroy(struct cfs_wi_sched *sched) cfs_list_del(&sched->ws_list); cfs_spin_unlock(&cfs_wi_data.wi_glock); +#else + SET_BUT_UNUSED(i); #endif LASSERT(sched->ws_nscheduled == 0); @@ -491,6 +493,8 @@ cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab, cfs_wi_sched_destroy(sched); return rc; } +#else + SET_BUT_UNUSED(rc); #endif cfs_spin_lock(&cfs_wi_data.wi_glock); cfs_list_add(&sched->ws_list, &cfs_wi_data.wi_scheds); diff --git a/lnet/utils/lst.c b/lnet/utils/lst.c index 4f40bcd..d6456e9 100644 --- a/lnet/utils/lst.c +++ b/lnet/utils/lst.c @@ -2008,7 +2008,6 @@ jt_lst_show_error(int argc, char **argv) lstcon_rpc_ent_t *ent; sfw_counters_t *sfwk; srpc_counters_t *srpc; - lnet_counters_t *lnet; int show_rpc = 1; int optidx = 0; int rc = 0; @@ -2092,7 +2091,6 @@ jt_lst_show_error(int argc, char **argv) sfwk = (sfw_counters_t *)&ent->rpe_payload[0]; srpc = (srpc_counters_t *)((char *)sfwk + sizeof(*sfwk)); - lnet = (lnet_counters_t *)((char *)srpc + sizeof(*srpc)); if (srpc->errors == 0 && sfwk->brw_errors == 0 && sfwk->ping_errors == 0) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 64c14e5..7797fd4 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -2451,6 +2451,7 @@ lustre/kernel_patches/targets/2.6-sles11.target 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/ldlm/Makefile lustre/fid/Makefile lustre/fid/autoMakefile diff --git a/lustre/fld/lproc_fld.c b/lustre/fld/lproc_fld.c index 7b784eb..1604609 100644 --- a/lustre/fld/lproc_fld.c +++ b/lustre/fld/lproc_fld.c @@ -166,7 +166,6 @@ static void *fldb_seq_start(struct seq_file *p, loff_t *pos) struct dt_object *obj; const struct dt_it_ops *iops; struct fld_seq_param *param; - struct fld_thread_info *info; if (fld->lsf_obj == NULL) return NULL; @@ -180,8 +179,6 @@ static void *fldb_seq_start(struct seq_file *p, loff_t *pos) lu_env_init(¶m->fsp_env, LCT_MD_THREAD); param->fsp_it = iops->init(¶m->fsp_env, obj, 0, NULL); - info = lu_context_key_get(¶m->fsp_env.le_ctx, - &fld_thread_key); iops->load(¶m->fsp_env, param->fsp_it, *pos); diff --git a/lustre/kernel_patches/targets/2.6-fc15.target.in b/lustre/kernel_patches/targets/2.6-fc15.target.in new file mode 100644 index 0000000..d560a46 --- /dev/null +++ b/lustre/kernel_patches/targets/2.6-fc15.target.in @@ -0,0 +1,14 @@ +lnxmaj="2.6.38.6" +lnxrel="26.rc1.fc15" + +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="" + diff --git a/lustre/llite/vvp_io.c b/lustre/llite/vvp_io.c index 50a19c9..c8f041e 100644 --- a/lustre/llite/vvp_io.c +++ b/lustre/llite/vvp_io.c @@ -89,12 +89,11 @@ static void vvp_io_fini(const struct lu_env *env, const struct cl_io_slice *ios) struct cl_object *obj = io->ci_obj; struct ccc_io *cio = cl2ccc_io(env, ios); __u32 gen; - int result; CLOBINVRNT(env, obj, ccc_object_invariant(obj)); /* check layout version */ - result = ll_layout_refresh(ccc_object_inode(obj), &gen); + ll_layout_refresh(ccc_object_inode(obj), &gen); if (cio->cui_layout_gen > 0) io->ci_need_restart = cio->cui_layout_gen == gen; } diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 855d2ee..4f03811 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -467,7 +467,6 @@ static int mdc_finish_enqueue(struct obd_export *exp, struct req_capsule *pill = &req->rq_pill; struct ldlm_request *lockreq; struct ldlm_reply *lockrep; - __u64 bits = 0; struct lustre_intent_data *intent = &it->d.lustre; ENTRY; @@ -494,7 +493,6 @@ static int mdc_finish_enqueue(struct obd_export *exp, ldlm_lock_decref(lockh, einfo->ei_mode); einfo->ei_mode = lock->l_req_mode; } - bits = lock->l_policy_data.l_inodebits.bits; LDLM_LOCK_PUT(lock); } diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index aa79f52..d772f18 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -3578,7 +3578,7 @@ int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg) handler = ptlrpcd_alloc_work(cli->cl_import, brw_queue_work, cli); if (IS_ERR(handler)) - GOTO(out_client_setup, PTR_ERR(handler)); + GOTO(out_client_setup, rc = PTR_ERR(handler)); cli->cl_writeback_work = handler; rc = osc_quota_setup(obd); diff --git a/lustre/tests/mpi/write_append_truncate.c b/lustre/tests/mpi/write_append_truncate.c index f739266..f003098 100644 --- a/lustre/tests/mpi/write_append_truncate.c +++ b/lustre/tests/mpi/write_append_truncate.c @@ -525,7 +525,6 @@ int main(int argc, char *argv[]) if (error == 1) { char command[4096]; - int rc; rprintf(rank, n, 0, STATUS_FMT"\n", write_char, write_size, write_size, @@ -533,7 +532,7 @@ int main(int argc, char *argv[]) trunc_offset, trunc_offset); sprintf(command, "od -Ax -a %s", fnames[0]); - rc = system(command); + ret = system(command); MPI_Abort(MPI_COMM_WORLD, 1); } } diff --git a/lustre/tests/mpi/write_disjoint.c b/lustre/tests/mpi/write_disjoint.c index a6d7e3d..9323747 100644 --- a/lustre/tests/mpi/write_disjoint.c +++ b/lustre/tests/mpi/write_disjoint.c @@ -204,7 +204,8 @@ int main (int argc, char *argv[]) { for (i = 0; i < noProcessors; i++) { char command[4096]; - int j, rc; + int j; + if (!memcmp(read_buf + (i * CHUNK_SIZE(n)), chunk_buf[i], CHUNK_SIZE(n))) continue; @@ -229,7 +230,7 @@ int main (int argc, char *argv[]) { } sprintf(command, "od -Ad -a %s", filename); - rc = system(command); + ret = system(command); rprintf(0, n, "data check error - exiting\n"); } } diff --git a/snmp/lustre-snmp.c b/snmp/lustre-snmp.c index 93e08ca..3225e23 100644 --- a/snmp/lustre-snmp.c +++ b/snmp/lustre-snmp.c @@ -571,7 +571,6 @@ write_sysStatus(int action, size_t name_len) { static long *long_ret; - int size; int new_value; @@ -597,7 +596,6 @@ write_sysStatus(int action, case RESERVE2: - size = var_val_len; long_ret = (long *) var_val; -- 1.8.3.1