Whamcloud - gitweb
LU-12930 various: use schedule_timeout_*interruptible
[fs/lustre-release.git] / lustre / osp / osp_sync.c
index f55672e..1e82b9c 100644 (file)
@@ -593,7 +593,7 @@ static int osp_sync_interpret(const struct lu_env *env,
                /*
                 * error happened, we'll try to repeat on next boot ?
                 */
-               LASSERTF(req->rq_transno == 0 || rc == -EIO ||
+               LASSERTF(req->rq_transno == 0 || rc == -EIO || rc == -EROFS ||
                         req->rq_import_generation < imp->imp_generation,
                         "transno %llu, rc %d, gen: req %d, imp %d\n",
                         req->rq_transno, rc, req->rq_import_generation,
@@ -1016,7 +1016,8 @@ static void osp_sync_process_committed(const struct lu_env *env,
        struct llog_ctxt        *ctxt;
        struct llog_handle      *llh;
        int                     *arr;
-       struct list_head         list, *le;
+       LIST_HEAD(list);
+       struct list_head         *le;
        struct llog_logid        lgid;
        int                      rc, i, count = 0, done = 0;
 
@@ -1047,7 +1048,6 @@ static void osp_sync_process_committed(const struct lu_env *env,
        llh = ctxt->loc_handle;
        LASSERT(llh);
 
-       INIT_LIST_HEAD(&list);
        spin_lock(&d->opd_sync_lock);
        list_splice(&d->opd_sync_committed_there, &list);
        INIT_LIST_HEAD(&d->opd_sync_committed_there);
@@ -1295,7 +1295,7 @@ next:
                        rc = llog_cleanup(&env, ctxt);
                        if (rc)
                                GOTO(out, rc);
-                       schedule_timeout_interruptible(HZ * 5);
+                       schedule_timeout_interruptible(cfs_time_seconds(5));
                        goto again;
                }