Skip to content
Snippets Groups Projects
Commit f4c42e22 authored by Alexey Lyashkov's avatar Alexey Lyashkov
Browse files

fix ASSERTION(export != NULL) failed in target_handle_connect

b=11327
i=adilger
i=shadow
parent 87f59d82
No related branches found
No related tags found
No related merge requests found
...@@ -107,6 +107,14 @@ Bugzilla : 11802 ...@@ -107,6 +107,14 @@ Bugzilla : 11802
Description: lustre support for RHEL5 Description: lustre support for RHEL5
Details : Add support for RHEL5. Details : Add support for RHEL5.
Severity : minor
Bugzilla : 11327
Frequency : rare
Description: ASSERTION(export != NULL) failed in target_handle_connect
Details : Assetion hit is result of rare race between disconnect and connet
to same nid. target_handle_connect found old connect cockie and
tried to reconnect, but can't find export for this cockie.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
2007-07-30 Cluster File Systems, Inc. <info@clusterfs.com> 2007-07-30 Cluster File Systems, Inc. <info@clusterfs.com>
......
...@@ -703,6 +703,12 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) ...@@ -703,6 +703,12 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler)
class_export_put(export); class_export_put(export);
export = NULL; export = NULL;
rc = -EALREADY; rc = -EALREADY;
} else if (export != NULL && export->exp_failed) { /* bug 11327 */
CDEBUG(D_HA, "%s: exp %p evict in progress - new cookie needed "
"for connect\n", export->exp_obd->obd_name, export);
class_export_put(export);
export = NULL;
rc = -ENODEV;
} else if (export != NULL) { } else if (export != NULL) {
spin_lock(&export->exp_lock); spin_lock(&export->exp_lock);
export->exp_connecting = 1; export->exp_connecting = 1;
...@@ -821,7 +827,7 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) ...@@ -821,7 +827,7 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler)
cluuid.uuid, libcfs_nid2str(req->rq_peer.nid), cluuid.uuid, libcfs_nid2str(req->rq_peer.nid),
export->exp_conn_cnt, export->exp_conn_cnt,
lustre_msg_get_conn_cnt(req->rq_reqmsg)); lustre_msg_get_conn_cnt(req->rq_reqmsg));
spin_unlock(&export->exp_lock); spin_unlock(&export->exp_lock);
GOTO(out, rc = -EALREADY); GOTO(out, rc = -EALREADY);
} }
...@@ -848,8 +854,8 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) ...@@ -848,8 +854,8 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler)
spin_lock(&target->obd_dev_lock); spin_lock(&target->obd_dev_lock);
/* Export might be hashed already, e.g. if this is reconnect */ /* Export might be hashed already, e.g. if this is reconnect */
if (hlist_unhashed(&export->exp_nid_hash)) if (hlist_unhashed(&export->exp_nid_hash))
lustre_hash_additem(export->exp_obd->obd_nid_hash_body, lustre_hash_additem(export->exp_obd->obd_nid_hash_body,
&export->exp_connection->c_peer.nid, &export->exp_connection->c_peer.nid,
&export->exp_nid_hash); &export->exp_nid_hash);
spin_unlock(&target->obd_dev_lock); spin_unlock(&target->obd_dev_lock);
...@@ -884,7 +890,7 @@ out: ...@@ -884,7 +890,7 @@ out:
export->exp_connecting = 0; export->exp_connecting = 0;
spin_unlock(&export->exp_lock); spin_unlock(&export->exp_lock);
} }
if (targref) if (targref)
class_decref(targref); class_decref(targref);
if (rc) if (rc)
req->rq_status = rc; req->rq_status = rc;
......
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