if (lustre_cfg_buf(lcfg, 4)) {
__u32 refnet = libcfs_str2net(lustre_cfg_string(lcfg, 4));
- if (refnet == LNET_NIDNET(LNET_NID_ANY)) {
+ if (refnet == LNET_NET_ANY) {
rc = -EINVAL;
CERROR("%s: bad mount option 'network=%s': rc = %d\n",
obd->obd_name, lustre_cfg_string(lcfg, 4),
LDLM_NAMESPACE_CLIENT,
LDLM_NAMESPACE_GREEDY,
ns_type);
- if (obd->obd_namespace == NULL) {
- CERROR("Unable to create client namespace - %s\n",
- obd->obd_name);
- GOTO(err_import, rc = -ENOMEM);
+ if (IS_ERR(obd->obd_namespace)) {
+ rc = PTR_ERR(obd->obd_namespace);
+ CERROR("%s: unable to create client namespace: rc = %d\n",
+ obd->obd_name, rc);
+ obd->obd_namespace = NULL;
+ GOTO(err_import, rc);
}
RETURN(rc);
OBD_FREE(cli->cl_mod_tag_bitmap,
BITS_TO_LONGS(OBD_MAX_RIF_MAX) * sizeof(long));
cli->cl_mod_tag_bitmap = NULL;
- RETURN(rc);
+ RETURN(rc);
}
EXPORT_SYMBOL(client_obd_setup);
if (!target->obd_recovering || target->obd_recovery_start == 0)
return 0;
- remaining = hrtimer_expires_remaining(&target->obd_recovery_timer);
+ remaining = hrtimer_get_remaining(&target->obd_recovery_timer);
timeout = ktime_divns(remaining, NSEC_PER_SEC);
if (timeout > -30)
return 0;
GOTO(out_already, rc);
}
- remaining = hrtimer_expires_remaining(&target->obd_recovery_timer);
+ remaining = hrtimer_get_remaining(&target->obd_recovery_timer);
timeout = ktime_divns(remaining, NSEC_PER_SEC);
if (timeout > 0) {
LCONSOLE_WARN("%s: Client %s (at %s) reconnected, waiting for %d clients in recovery for %lld:%.02lld\n",
} else if (lustre_msg_get_conn_cnt(req->rq_reqmsg) == 1 &&
rc != EALREADY) {
if (!strstr(cluuid.uuid, "mdt"))
- LCONSOLE_WARN("%s: Rejecting reconnect from the known client %s (at %s) because it is indicating it is a new client",
+ LCONSOLE_WARN("%s: Rejecting reconnect from the known client %s (at %s) because it is indicating it is a new client\n",
target->obd_name, cluuid.uuid,
libcfs_nid2str(req->rq_peer.nid));
GOTO(out, rc = -EALREADY);
known =
atomic_read(&target->obd_max_recoverable_clients);
stale = target->obd_stale_clients;
- remaining = hrtimer_expires_remaining(timer);
+ remaining = hrtimer_get_remaining(timer);
left = ktime_divns(remaining, NSEC_PER_SEC);
if (ktime_to_ns(remaining) > 0) {
}
LASSERT(obd->obd_recovery_start != 0);
- left_ns = hrtimer_expires_remaining(&obd->obd_recovery_timer);
+ left_ns = hrtimer_get_remaining(&obd->obd_recovery_timer);
left = ktime_divns(left_ns, NSEC_PER_SEC);
if (extend) {
thread->t_env = env;
thread->t_id = -1; /* force filter_iobuf_get/put to use local buffers */
+ thread->t_task = current;
env->le_ctx.lc_thread = thread;
tgt_io_thread_init(thread); /* init thread_big_cache for IO requests */
LASSERT(trd->trd_processing_task == current->pid);
DEBUG_REQ(D_HA, req, "processing lock from %s:",
libcfs_nid2str(req->rq_peer.nid));
+ if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_LOCK_REPLAY)) {
+ req->rq_status = -ENODEV;
+ target_request_copy_put(req);
+ continue;
+ }
handle_recovery_req(thread, req,
trd->trd_recovery_handler);
target_request_copy_put(req);