Whamcloud - gitweb
LU-14098 obdclass: try to skip corrupted llog records
[fs/lustre-release.git] / lustre / osp / osp_sync.c
index 728c99e..92a9e1b 100644 (file)
@@ -1272,7 +1272,7 @@ next:
 
                CERROR("%s: llog process with osp_sync_process_queues "
                       "failed: %d\n", d->opd_obd->obd_name, rc);
-               GOTO(close, rc);
+               GOTO(wait, rc);
        }
        LASSERTF(rc == 0 || rc == LLOG_PROC_BREAK,
                 "%u changes, %u in progress, %u in flight: %d\n",
@@ -1287,6 +1287,7 @@ next:
                 atomic_read(&d->opd_sync_rpcs_in_progress),
                 atomic_read(&d->opd_sync_rpcs_in_flight));
 
+wait:
        /* wait till all the requests are completed */
        count = 0;
        while (atomic_read(&d->opd_sync_rpcs_in_progress) > 0) {
@@ -1306,7 +1307,6 @@ next:
 
        }
 
-close:
        llog_cat_close(env, llh);
        rc = llog_cleanup(env, ctxt);
        if (rc)
@@ -1432,7 +1432,7 @@ static int osp_sync_llog_init(const struct lu_env *env, struct osp_device *d)
        LASSERT(lgh != NULL);
        ctxt->loc_handle = lgh;
 
-       rc = llog_init_handle(env, lgh, LLOG_F_IS_CAT, NULL);
+       rc = llog_init_handle(env, lgh, LLOG_F_IS_CAT | LLOG_F_RM_ON_ERR, NULL);
        if (rc)
                GOTO(out_close, rc);