From: Bruno Faccini Date: Sun, 18 Feb 2018 19:13:04 +0000 (+0100) Subject: LU-10680 mdd: fix run_gc_task uninitialized X-Git-Tag: 2.10.59~78 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=25cdbbb475b8a42e3a1f594898d2ac1406b466f6;p=fs%2Flustre-release.git LU-10680 mdd: fix run_gc_task uninitialized run_gc_task has been mistakenly left uninitialized in previous patch for LU-7340. This has been silently ignored by gcc even if -Wall option is used during build, possibly because no optimization level/option requested where -Wuninitialized option/check may only pe performed. The side effect is that generated assembly code completelly avoids run_gc_task usage from source, and thus a kthread for ChangeLogs garbage-collection is created upon each record creation and this without any of the garbage-collection conditions are triggered. Signed-off-by: Bruno Faccini Change-Id: Ieb9ce062ba6ebf0c365c1e6f8a57f89dd39e0a9d Reviewed-on: https://review.whamcloud.com/31347 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Fan Yong Reviewed-by: Stephan Thiell --- diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index 2df81f2..f783798 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -939,7 +939,7 @@ int mdd_changelog_store(const struct lu_env *env, struct mdd_device *mdd, struct llog_ctxt *ctxt; struct thandle *llog_th; int rc; - bool run_gc_task; + bool run_gc_task = false; rec->cr_hdr.lrh_len = llog_data_len(sizeof(*rec) + changelog_rec_varsize(&rec->cr));