X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fptlrpc%2Frecover.c;h=c526e9e5c65f7d3209cf990e7eaf06fb1684c788;hp=f510b746744c3aceba9cca238873ea7e4347da1b;hb=7d29d3167684b13a612c8c1bff860019a218115c;hpb=6d039389735c52f965505643de9d8e4772e3f87f diff --git a/lustre/ptlrpc/recover.c b/lustre/ptlrpc/recover.c index f510b74..c526e9e 100644 --- a/lustre/ptlrpc/recover.c +++ b/lustre/ptlrpc/recover.c @@ -140,10 +140,13 @@ int ptlrpc_replay_next(struct obd_import *imp, int *inflight) if (req != NULL && imp->imp_resend_replay) lustre_msg_add_flags(req->rq_reqmsg, MSG_RESENT); - /* The resend replay request may have been removed from the + /* ptlrpc_prepare_replay() may fail to add the reqeust into unreplied + * list if the request hasn't been added to replay list then. Another + * exception is that resend replay could have been removed from the * unreplied list. */ - if (req != NULL && imp->imp_resend_replay && - list_empty(&req->rq_unreplied_list)) { + if (req != NULL && list_empty(&req->rq_unreplied_list)) { + DEBUG_REQ(D_HA, req, "resend_replay: %d, last_transno: %llu\n", + imp->imp_resend_replay, last_transno); ptlrpc_add_unreplied(req); imp->imp_known_replied_xid = ptlrpc_known_replied_xid(imp); } @@ -152,8 +155,6 @@ int ptlrpc_replay_next(struct obd_import *imp, int *inflight) spin_unlock(&imp->imp_lock); if (req != NULL) { - /* The request should have been added back in unreplied list - * by ptlrpc_prepare_replay(). */ LASSERT(!list_empty(&req->rq_unreplied_list)); rc = ptlrpc_replay_req(req);