Skip to content
Snippets Groups Projects
Commit 26892d7b authored by Robert Read's avatar Robert Read
Browse files

b=2432

Merging fix from b_llp2. Set the rq_no_resend for cancel requests so
ldlm_cli_cancel() can reconstruct the cancel with the correct
cookie.
parent ae3c7b72
No related branches found
No related tags found
No related merge requests found
...@@ -511,6 +511,7 @@ int ldlm_cli_cancel(struct lustre_handle *lockh) ...@@ -511,6 +511,7 @@ int ldlm_cli_cancel(struct lustre_handle *lockh)
goto local_cancel; goto local_cancel;
} }
restart:
imp = class_exp2cliimp(lock->l_conn_export); imp = class_exp2cliimp(lock->l_conn_export);
if (imp == NULL || imp->imp_invalid) { if (imp == NULL || imp->imp_invalid) {
CDEBUG(D_HA, "skipping cancel on invalid import %p\n", CDEBUG(D_HA, "skipping cancel on invalid import %p\n",
...@@ -521,6 +522,7 @@ int ldlm_cli_cancel(struct lustre_handle *lockh) ...@@ -521,6 +522,7 @@ int ldlm_cli_cancel(struct lustre_handle *lockh)
req = ptlrpc_prep_req(imp, LDLM_CANCEL, 1, &size, NULL); req = ptlrpc_prep_req(imp, LDLM_CANCEL, 1, &size, NULL);
if (!req) if (!req)
GOTO(out, rc = -ENOMEM); GOTO(out, rc = -ENOMEM);
req->rq_no_resend = 1;
/* XXX FIXME bug 249 */ /* XXX FIXME bug 249 */
req->rq_request_portal = LDLM_CANCEL_REQUEST_PORTAL; req->rq_request_portal = LDLM_CANCEL_REQUEST_PORTAL;
...@@ -534,13 +536,17 @@ int ldlm_cli_cancel(struct lustre_handle *lockh) ...@@ -534,13 +536,17 @@ int ldlm_cli_cancel(struct lustre_handle *lockh)
rc = ptlrpc_queue_wait(req); rc = ptlrpc_queue_wait(req);
if (rc == ESTALE) if (rc == ESTALE) {
CERROR("client/server (nid "LPU64") out of sync--not " CERROR("client/server (nid "LPU64") out of sync--not "
"fatal\n", "fatal\n",
req->rq_import->imp_connection->c_peer.peer_nid); req->rq_import->imp_connection->c_peer.peer_nid);
else if (rc != ELDLM_OK) } else if (rc == -ETIMEDOUT) {
ptlrpc_req_finished(req);
GOTO(restart, rc);
} else if (rc != ELDLM_OK) {
CERROR("Got rc %d from cancel RPC: canceling " CERROR("Got rc %d from cancel RPC: canceling "
"anyway\n", rc); "anyway\n", rc);
}
ptlrpc_req_finished(req); ptlrpc_req_finished(req);
local_cancel: local_cancel:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment