From 80adfae553a61dc51df5344e98988cda0c281ad4 Mon Sep 17 00:00:00 2001 From: Di Wang Date: Wed, 8 Mar 2017 09:04:42 -0500 Subject: [PATCH] LU-9197 llog: return 0 if llog destroy fails In llog_cancel_rec(), let's return 0 if only destroying the final plain llog fails, because the bitmap has been cleared successfully, and the orphan supposed to be handled by LFSCK anyway. So let's not try to destroy again, which will pretty much complicate the code here. And also in this case, we do not need restore the llh_count and bitmap, because the record has been deleted for llog anyway. Signed-off-by: Di Wang Change-Id: I762def0f0de08a2960997ab9463f4e72fbad531d Reviewed-on: https://review.whamcloud.com/26069 Tested-by: Jenkins Reviewed-by: Fan Yong Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/obdclass/llog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index 79a4dea..8a589aa 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -275,7 +275,7 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle, loghandle->lgh_ctxt->loc_obd->obd_name, POSTID(&loghandle->lgh_id.lgl_oi), loghandle->lgh_id.lgl_ogen, rc); - GOTO(out_unlock, rc); + GOTO(out_unlock, rc = 0); } rc = LLOG_DEL_PLAIN; } -- 1.8.3.1