* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
GOTO(err_ldlm, rc = -ENOENT);
imp->imp_client = &obddev->obd_ldlm_client;
imp->imp_connect_op = connect_op;
- imp->imp_initial_recov = 1;
- imp->imp_initial_recov_bk = 0;
CFS_INIT_LIST_HEAD(&imp->imp_pinger_chain);
memcpy(cli->cl_target_uuid.uuid, lustre_cfg_buf(lcfg, 1),
LUSTRE_CFG_BUFLEN(lcfg, 1));
if (obd->obd_namespace != NULL) {
/* obd_force == local only */
ldlm_cli_cancel_unused(obd->obd_namespace, NULL,
- obd->obd_force ? LDLM_FL_LOCAL_ONLY:0,
- NULL);
+ obd->obd_force ? LCF_LOCAL : 0, NULL);
ldlm_namespace_free_prior(obd->obd_namespace, imp, obd->obd_force);
}
req->rq_self,
&remote_uuid);
if (cfs_hlist_unhashed(&export->exp_nid_hash)) {
- cfs_hash_add_unique(export->exp_obd->obd_nid_hash,
- &export->exp_connection->c_peer.nid,
- &export->exp_nid_hash);
+ cfs_hash_add(export->exp_obd->obd_nid_hash,
+ &export->exp_connection->c_peer.nid,
+ &export->exp_nid_hash);
}
cfs_spin_lock_bh(&target->obd_processing_task_lock);
int rc;
ENTRY;
- rc = lu_context_init(&req->rq_recov_session, LCT_SESSION);
- if (rc) {
- CERROR("Failure to initialize session: %d\n", rc);
- GOTO(reqcopy_put, rc);
- }
/**
* export can be evicted during recovery, no need to handle replays for
* it after that, discard such request silently
*/
if (req->rq_export->exp_disconnected)
+ GOTO(reqcopy_put, rc = 0);
+
+ rc = lu_context_init(&req->rq_recov_session, LCT_SESSION);
+ if (rc) {
+ CERROR("Failure to initialize session: %d\n", rc);
GOTO(reqcopy_put, rc);
+ }
req->rq_recov_session.lc_thread = thread;
lu_context_enter(&req->rq_recov_session);