restore generation check.
b=15069
i=johan
i=rread
* RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a
removed cwd "./" (refer to Bugzilla 14399).
* RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a
removed cwd "./" (refer to Bugzilla 14399).
+Severity : normal
+Bugzilla : 15069
+Description: don't put request into delay list while invalidate in flight.
+Details : ptlrpc_delay_request sometimes put in delay list while invalidate
+ import in flight. this produce timeout for invalidate and sometimes
+ can cause stale data.
+
Severity : minor
Bugzilla : 14856
Frequency : on ppc only
Severity : minor
Bugzilla : 14856
Frequency : on ppc only
switch (event) {
case IMP_EVENT_DISCON:
/* MGC imports should not wait for recovery */
switch (event) {
case IMP_EVENT_DISCON:
/* MGC imports should not wait for recovery */
- ptlrpc_invalidate_import(imp);
break;
case IMP_EVENT_INACTIVE:
break;
break;
case IMP_EVENT_INACTIVE:
break;
} else if (req->rq_send_state == LUSTRE_IMP_CONNECTING &&
imp->imp_state == LUSTRE_IMP_CONNECTING) {
/* allow CONNECT even if import is invalid */ ;
} else if (req->rq_send_state == LUSTRE_IMP_CONNECTING &&
imp->imp_state == LUSTRE_IMP_CONNECTING) {
/* allow CONNECT even if import is invalid */ ;
- } else if (imp->imp_invalid && (!imp->imp_recon_bk ||
- imp->imp_obd->obd_no_recov)) {
+ if (atomic_read(&imp->imp_inval_count) != 0) {
+ DEBUG_REQ(D_ERROR, req, "invalidate in flight");
+ *status = -EIO;
+ }
+
+ } else if ((imp->imp_invalid && (!imp->imp_recon_bk)) ||
+ imp->imp_obd->obd_no_recov) {
/* If the import has been invalidated (such as by an OST
/* If the import has been invalidated (such as by an OST
- * failure), and if the import(MGC) tried all of its connection
- * list (Bug 13464), the request must fail with -ESHUTDOWN.
+ * failure), and if the import(MGC) tried all of its connection
+ * list (Bug 13464), the request must fail with -ESHUTDOWN.
* This indicates the requests should be discarded; an -EIO
* This indicates the requests should be discarded; an -EIO
- * may result in a resend of the request. */
+ * may result in a resend of the request. */
- DEBUG_REQ(D_ERROR, req, "IMP_INVALID");
+ DEBUG_REQ(D_ERROR, req, "IMP_INVALID");
*status = -ESHUTDOWN; /* bz 12940 */
} else if (req->rq_import_generation != imp->imp_generation) {
DEBUG_REQ(D_ERROR, req, "req wrong generation:");
*status = -EIO;
} else if (req->rq_send_state != imp->imp_state) {
*status = -ESHUTDOWN; /* bz 12940 */
} else if (req->rq_import_generation != imp->imp_generation) {
DEBUG_REQ(D_ERROR, req, "req wrong generation:");
*status = -EIO;
} else if (req->rq_send_state != imp->imp_state) {
- if (imp->imp_obd->obd_no_recov)
- *status = -ESHUTDOWN;
- else if (imp->imp_dlm_fake || req->rq_no_delay)
+ /* invalidate in progress - any requests should be drop */
+ if (atomic_read(&imp->imp_inval_count) != 0) {
+ DEBUG_REQ(D_ERROR, req, "invalidate in flight");
+ *status = -EIO;
+ } else if (imp->imp_dlm_fake || req->rq_no_delay) {
libcfs_nid2str(imp->imp_connection->c_peer.nid),
lustre_msg_get_opc(req->rq_reqmsg));
libcfs_nid2str(imp->imp_connection->c_peer.nid),
lustre_msg_get_opc(req->rq_reqmsg));
- set->set_remaining--;
-
atomic_dec(&imp->imp_inflight);
atomic_dec(&imp->imp_inflight);
cfs_waitq_signal(&imp->imp_recovery_waitq);
}
cfs_waitq_signal(&imp->imp_recovery_waitq);
}
req->rq_phase = RQ_PHASE_RPC;
spin_lock(&imp->imp_lock);
req->rq_phase = RQ_PHASE_RPC;
spin_lock(&imp->imp_lock);
req->rq_import_generation = imp->imp_generation;
req->rq_import_generation = imp->imp_generation;
if (ptlrpc_import_delay_req(imp, req, &rc)) {
list_del(&req->rq_list);
if (ptlrpc_import_delay_req(imp, req, &rc)) {
list_del(&req->rq_list);
ptlrpc_wake_client_req(req);
}
ptlrpc_wake_client_req(req);
}
- /* these balance the references in ptl_send_rpc() */
- atomic_dec(&req->rq_import->imp_inflight);
ptlrpc_req_finished(req);
EXIT;
ptlrpc_req_finished(req);
EXIT;
request->rq_reply_portal);
}
request->rq_reply_portal);
}
- /* add references on request and import for request_out_callback */
+ /* add references on request for request_out_callback */
ptlrpc_request_addref(request);
ptlrpc_request_addref(request);
- atomic_inc(&request->rq_import->imp_inflight);
if (obd->obd_svc_stats != NULL)
lprocfs_counter_add(obd->obd_svc_stats, PTLRPC_REQACTIVE_CNTR,
request->rq_import->imp_inflight.counter);
if (obd->obd_svc_stats != NULL)
lprocfs_counter_add(obd->obd_svc_stats, PTLRPC_REQACTIVE_CNTR,
request->rq_import->imp_inflight.counter);
- /* drop request_out_callback refs, we couldn't start the send */
- atomic_dec(&request->rq_import->imp_inflight);
ptlrpc_req_finished(request);
ptlrpc_req_finished(request);
if (noreply)
RETURN(rc);
else
if (noreply)
RETURN(rc);
else