spin_unlock(&d->opd_syn_lock);
while (!list_empty(&list)) {
- struct llog_cookie *lcookie = NULL;
struct osp_job_req_args *jra;
jra = list_entry(list.next, struct osp_job_req_args, jra_link);
body = req_capsule_client_get(&req->rq_pill,
&RMF_OST_BODY);
LASSERT(body);
- lcookie = &body->oa.o_lcookie;
/* import can be closing, thus all commit cb's are
* called we can check committness directly */
- if (req->rq_transno <= imp->imp_peer_committed_transno) {
- rc = llog_cat_cancel_records(env, llh, 1, lcookie);
+ if (req->rq_import_generation == imp->imp_generation) {
+ rc = llog_cat_cancel_records(env, llh, 1,
+ &body->oa.o_lcookie);
if (rc)
CERROR("%s: can't cancel record: %d\n",
obd->obd_name, rc);
} else {
- DEBUG_REQ(D_HA, req, "not committed");
+ DEBUG_REQ(D_ERROR, req, "imp_committed = "LPU64,
+ imp->imp_peer_committed_transno);
}
-
ptlrpc_req_finished(req);
done++;
}
struct obd_device *obd = req->rq_import->imp_obd;
int rc;
struct timeval work_start;
+ __u64 committed;
long timediff;
ENTRY;
/*
* Replay-enabled imports return commit-status information.
*/
- if (lustre_msg_get_last_committed(req->rq_repmsg)) {
- imp->imp_peer_committed_transno =
- lustre_msg_get_last_committed(req->rq_repmsg);
- }
+ committed = lustre_msg_get_last_committed(req->rq_repmsg);
+ if (likely(committed > imp->imp_peer_committed_transno))
+ imp->imp_peer_committed_transno = committed;
ptlrpc_free_committed(imp);