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",
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) {
}
-close:
llog_cat_close(env, llh);
rc = llog_cleanup(env, ctxt);
if (rc)
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);