Whamcloud - gitweb
LU-9197 llog: return 0 if llog destroy fails 69/26069/2
authorDi Wang <di.wang@intel.com>
Wed, 8 Mar 2017 14:04:42 +0000 (09:04 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 26 Mar 2017 06:51:12 +0000 (06:51 +0000)
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 <di.wang@intel.com>
Change-Id: I762def0f0de08a2960997ab9463f4e72fbad531d
Reviewed-on: https://review.whamcloud.com/26069
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/llog.c

index 79a4dea..8a589aa 100644 (file)
@@ -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;
        }