Whamcloud - gitweb
try to clean up all lov/mds llogs, even if first on fails
authornathan <nathan>
Mon, 28 Mar 2005 23:05:35 +0000 (23:05 +0000)
committernathan <nathan>
Mon, 28 Mar 2005 23:05:35 +0000 (23:05 +0000)
lustre/lov/lov_log.c
lustre/mds/mds_log.c

index 056d60d..f04c996 100644 (file)
@@ -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);
 }
index 1436948..9fa802a 100644 (file)
@@ -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);
 }