From: tappro Date: Wed, 3 Sep 2008 08:11:19 +0000 (+0000) Subject: - export handling for VBR X-Git-Tag: v1_7_110~2^294 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=804060e30a6a37ad3cde3e797b8d40f5d45489d8;p=fs%2Flustre-release.git - export handling for VBR b:15391 i:rread, bzzz --- diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 5e9e501..b89dff0 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -740,14 +740,14 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) req->rq_peer.nid != export->exp_connection->c_peer.nid) { /* make darn sure this is coming from the same peer * if the UUIDs matched */ - CWARN("%s: cookie %s seen on new NID %s when " - "existing NID %s is already connected\n", - target->obd_name, cluuid.uuid, - libcfs_nid2str(req->rq_peer.nid), - libcfs_nid2str(export->exp_connection->c_peer.nid)); - class_export_put(export); - export = NULL; - rc = -EALREADY; + CWARN("%s: cookie %s seen on new NID %s when " + "existing NID %s is already connected\n", + target->obd_name, cluuid.uuid, + libcfs_nid2str(req->rq_peer.nid), + libcfs_nid2str(export->exp_connection->c_peer.nid)); + class_export_put(export); + export = NULL; + 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); @@ -756,10 +756,11 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) rc = -ENODEV; } else if (export != NULL && export->exp_delayed && !(data && data->ocd_connect_flags & OBD_CONNECT_VBR)) { + spin_unlock(&target->obd_dev_lock); class_fail_export(export); class_export_put(export); export = NULL; - rc = -ENODEV; + GOTO(out, rc = -ENODEV); } else if (export != NULL) { spin_lock(&export->exp_lock); export->exp_connecting = 1; @@ -1225,8 +1226,7 @@ static void target_recovery_expired(unsigned long castmeharder) spin_lock_bh(&obd->obd_processing_task_lock); /* VBR: no clients are remained to replay, stop recovery */ - if (obd->obd_recovering && - obd->obd_recoverable_clients == 0) + if (obd->obd_recovering && obd->obd_recoverable_clients == 0) obd->obd_abort_recovery = 1; /* always check versions now */ obd->obd_version_recov = 1; @@ -1631,6 +1631,7 @@ int target_queue_last_replay_reply(struct ptlrpc_request *req, int rc) spin_lock(&obd->obd_dev_lock); list_add_tail(&exp->exp_obd_chain_timed, &obd->obd_exports_timed); + list_move_tail(&exp->exp_obd_chain, &obd->obd_exports); spin_unlock(&obd->obd_dev_lock); target_send_delayed_replies(obd); }