From: Di Wang Date: Thu, 16 Jun 2016 23:23:21 +0000 (-0400) Subject: LU-7809 lod: stop recovery before destory dtrq list X-Git-Tag: 2.8.58~12 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f2892fda72897a8a264414c06e54751d127a5709;p=fs%2Flustre-release.git LU-7809 lod: stop recovery before destory dtrq list Let's stop the recovery thread before destroying update recovery list, which might cause race especially when doing umount during recovery. Signed-off-by: Di Wang Change-Id: I96fd2dd09caadb458723001f535d53f1d468394b Reviewed-on: http://review.whamcloud.com/18651 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- diff --git a/lustre/lod/lod_dev.c b/lustre/lod/lod_dev.c index 109c6c6..86035fa 100644 --- a/lustre/lod/lod_dev.c +++ b/lustre/lod/lod_dev.c @@ -850,6 +850,7 @@ static void lod_fini_distribute_txn(const struct lu_env *env, struct lu_target *lut; lut = lod2lu_dev(lod)->ld_site->ls_tgt; + target_recovery_fini(lut->lut_obd); if (lut->lut_tdtd == NULL) return; diff --git a/lustre/lod/lod_internal.h b/lustre/lod/lod_internal.h index d831ea9..f2f6c23 100644 --- a/lustre/lod/lod_internal.h +++ b/lustre/lod/lod_internal.h @@ -429,6 +429,7 @@ int lod_sub_init_llog(const struct lu_env *env, struct lod_device *lod, void lod_sub_fini_llog(const struct lu_env *env, struct dt_device *dt, struct ptlrpc_thread *thread); int lodname2mdt_index(char *lodname, __u32 *mdt_index); +extern void target_recovery_fini(struct obd_device *obd); /* lod_lov.c */ void lod_getref(struct lod_tgt_descs *ltd); diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index aafd3b1..422c5c3 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -4521,7 +4521,6 @@ static void mdt_fini(const struct lu_env *env, struct mdt_device *m) next->md_ops->mdo_iocontrol(env, next, OBD_IOC_STOP_LFSCK, 0, &stop); mdt_stack_pre_fini(env, m, md2lu_dev(m->mdt_child)); - target_recovery_fini(obd); ping_evictor_stop(); if (m->mdt_opts.mo_coordinator)