From: nathan Date: Mon, 28 Mar 2005 23:05:35 +0000 (+0000) Subject: try to clean up all lov/mds llogs, even if first on fails X-Git-Tag: v1_8_0_110~486^7~103 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=7a97d943e84e9a2438eb8f1a7e32d325de6a98af;p=fs%2Flustre-release.git try to clean up all lov/mds llogs, even if first on fails --- diff --git a/lustre/lov/lov_log.c b/lustre/lov/lov_log.c index 056d60d..f04c996 100644 --- a/lustre/lov/lov_log.c +++ b/lustre/lov/lov_log.c @@ -191,7 +191,7 @@ int lov_llog_init(struct obd_device *obd, struct obd_device *tgt, int lov_llog_finish(struct obd_device *obd, int count) { struct llog_ctxt *ctxt; - int rc = 0; + int rc = 0, rc2 = 0; ENTRY; /* cleanup our llogs only if the ctxts have been setup @@ -199,12 +199,12 @@ int lov_llog_finish(struct obd_device *obd, int count) ctxt = llog_get_context(obd, LLOG_UNLINK_ORIG_CTXT); if (ctxt) rc = llog_cleanup(ctxt); - if (rc) - RETURN(rc); ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT); if (ctxt) - rc = llog_cleanup(ctxt); + rc2 = llog_cleanup(ctxt); + if (!rc) + rc = rc2; RETURN(rc); } diff --git a/lustre/mds/mds_log.c b/lustre/mds/mds_log.c index 1436948..9fa802a 100644 --- a/lustre/mds/mds_log.c +++ b/lustre/mds/mds_log.c @@ -145,18 +145,18 @@ int mds_llog_init(struct obd_device *obd, struct obd_device *tgt, int mds_llog_finish(struct obd_device *obd, int count) { struct llog_ctxt *ctxt; - int rc = 0; + int rc = 0, rc2 = 0; ENTRY; ctxt = llog_get_context(obd, LLOG_UNLINK_ORIG_CTXT); if (ctxt) rc = llog_cleanup(ctxt); - if (rc) - RETURN(rc); ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT); if (ctxt) - rc = llog_cleanup(ctxt); - + rc2 = llog_cleanup(ctxt); + if (!rc) + rc = rc2; + RETURN(rc); }