From 932577dd2a4afe1bf00103390c87ea552d782169 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Tue, 9 Feb 2016 16:00:04 +0300 Subject: [PATCH] LU-7772 llog: do not destroy llog twice if llog_process_thread() finds a llog corrupted, then it cancels all remaining records which in turn causes destroy of this llog. but it's still referenced by the catalog's in-code structures (chd_head list) and llog_cat_close() at umount tries to destroy this llog again. we can reset LLOG_F_ZAP_WHEN_EMPTY at destroy, so it never repeats. Change-Id: I8173d9dd2971fa5cce613e71555ca04e96b5512b Signed-off-by: Alex Zhuravlev Reviewed-on: http://review.whamcloud.com/18362 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: wangdi Reviewed-by: Lai Siyao Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/obdclass/llog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index 971c643..174347c 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -262,6 +262,8 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle, (loghandle->u.phd.phd_cat_handle != NULL && loghandle->u.phd.phd_cat_handle->u.chd.chd_current_log != loghandle))) { + /* never try to destroy it again */ + llh->llh_flags &= ~LLOG_F_ZAP_WHEN_EMPTY; rc = llog_trans_destroy(env, loghandle, th); if (rc < 0) { /* Sigh, can not destroy the final plain llog, but -- 1.8.3.1