@@ -943,7 +943,7 @@ struct ptlrpc_request {
/** our LNet NID */
struct lnet_nid rq_self;
/** Peer description (the other side) */
- struct lnet_process_id rq_peer;
+ struct lnet_processid rq_peer;
/** Descriptor for the NID from which the peer sent the request. */
struct lnet_process_id rq_source;
/**
@@ -1706,7 +1706,7 @@ static inline bool nrs_policy_compat_one(const struct ptlrpc_service *svc,
/* ptlrpc/events.c */
int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
- struct lnet_process_id *peer,
+ struct lnet_processid *peer,
struct lnet_nid *self,
u32 refnet);
/**
@@ -1722,7 +1722,7 @@ int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
/** @} */
/* ptlrpc/connection.c */
-struct ptlrpc_connection *ptlrpc_connection_get(struct lnet_process_id peer,
+struct ptlrpc_connection *ptlrpc_connection_get(struct lnet_processid *peer,
struct lnet_nid *self,
struct obd_uuid *uuid);
@@ -584,9 +584,9 @@ static inline void ldlm_callback_errmsg(struct ptlrpc_request *req,
const struct lustre_handle *handle)
{
DEBUG_REQ((req->rq_no_reply || rc) ? D_WARNING : D_DLMTRACE, req,
- "%s: [nid %s] [rc %d] [lock %#llx]",
- msg, libcfs_id2str(req->rq_peer), rc,
- handle ? handle->cookie : 0);
+ "%s: NID=%s lock=%#llx: rc = %d",
+ msg, libcfs_idstr(&req->rq_peer),
+ handle ? handle->cookie : 0, rc);
if (req->rq_no_reply)
CWARN("No reply was sent, maybe cause bug 21636.\n");
else if (rc)
@@ -2100,7 +2100,7 @@ static int replay_lock_interpret(const struct lu_env *env,
CERROR("received replay ack for unknown local cookie %#llx remote cookie %#llx from server %s id %s\n",
aa->lock_handle.cookie, reply->lock_handle.cookie,
req->rq_export->exp_client_uuid.uuid,
- libcfs_id2str(req->rq_peer));
+ libcfs_idstr(&req->rq_peer));
rc = -ESTALE;
goto out;
}
@@ -106,7 +106,7 @@ struct ptlrpc_connection *ptlrpc_uuid_to_connection(struct obd_uuid *uuid,
{
struct ptlrpc_connection *c;
struct lnet_nid self;
- struct lnet_process_id peer;
+ struct lnet_processid peer;
int err;
/*
@@ -120,7 +120,7 @@ struct ptlrpc_connection *ptlrpc_uuid_to_connection(struct obd_uuid *uuid,
return NULL;
}
- c = ptlrpc_connection_get(peer, &self, uuid);
+ c = ptlrpc_connection_get(&peer, &self, uuid);
if (c) {
memcpy(c->c_remote_uuid.uuid,
uuid->uuid, sizeof(c->c_remote_uuid.uuid));
@@ -76,13 +76,12 @@ static int lnet_process_id_cmp(struct rhashtable_compare_arg *arg,
};
struct ptlrpc_connection *
-ptlrpc_connection_get(struct lnet_process_id peer4, struct lnet_nid *self,
+ptlrpc_connection_get(struct lnet_processid *peer_orig, struct lnet_nid *self,
struct obd_uuid *uuid)
{
struct ptlrpc_connection *conn, *conn2;
- struct lnet_processid peer;
+ struct lnet_processid peer = *peer_orig;
- lnet_pid4_to_pid(peer4, &peer);
LNetPrimaryNID(&peer.nid);
conn = rhashtable_lookup_fast(&conn_hash, &peer, conn_hash_params);
if (conn) {
@@ -346,7 +346,7 @@ void request_in_callback(struct lnet_event *ev)
req->rq_reqdata_len = ev->mlength;
ktime_get_real_ts64(&req->rq_arrival_time);
/* Multi-Rail: keep track of both initiator and source NID. */
- req->rq_peer = lnet_pid_to_pid4(&ev->initiator);
+ req->rq_peer = ev->initiator;
req->rq_source = lnet_pid_to_pid4(&ev->source);
req->rq_self = ev->target.nid;
req->rq_rqbd = rqbd;
@@ -356,7 +356,7 @@ void request_in_callback(struct lnet_event *ev)
req, req->rq_xid, ev->mlength);
CDEBUG(D_RPCTRACE, "peer: %s (source: %s)\n",
- libcfs_id2str(req->rq_peer), libcfs_id2str(req->rq_source));
+ libcfs_idstr(&req->rq_peer), libcfs_id2str(req->rq_source));
spin_lock(&svcpt->scp_lock);
@@ -468,7 +468,7 @@ static void ptlrpc_master_callback(struct lnet_event *ev)
}
int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
- struct lnet_process_id *peer,
+ struct lnet_processid *peer,
struct lnet_nid *self,
u32 refnet)
{
@@ -494,8 +494,8 @@ int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
continue;
if (dist == 0) { /* local! use loopback LND */
- peer->nid = LNET_NID_LO_0;
- lnet_nid4_to_nid(peer->nid, self);
+ lnet_nid4_to_nid(LNET_NID_LO_0, self);
+ peer->nid = *self;
rc = 0;
break;
}
@@ -506,13 +506,13 @@ int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
best_dist = dist;
best_order = order;
- peer->nid = lnet_nid_to_nid4(&dst_nid);
+ peer->nid = dst_nid;
*self = src_nid;
rc = 0;
}
}
- CDEBUG(D_NET, "%s->%s\n", uuid->uuid, libcfs_id2str(*peer));
+ CDEBUG(D_NET, "%s->%s\n", uuid->uuid, libcfs_idstr(peer));
return rc;
}
@@ -1009,7 +1009,7 @@ static int ptlrpc_lprocfs_svc_req_history_show(struct seq_file *s, void *iter)
req->rq_export->exp_obd->obd_name :
libcfs_nidstr_r(&req->rq_self, nidstr,
sizeof(nidstr)),
- libcfs_id2str(req->rq_peer), req->rq_xid,
+ libcfs_idstr(&req->rq_peer), req->rq_xid,
req->rq_reqlen, ptlrpc_rqphase2str(req),
(s64)req->rq_arrival_time.tv_sec,
(s64)req->rq_arrival_time.tv_nsec / NSEC_PER_USEC,
@@ -416,7 +416,8 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)
ptlrpc_at_set_reply(req, flags);
if (!req->rq_export || !req->rq_export->exp_connection)
- conn = ptlrpc_connection_get(req->rq_peer, &req->rq_self, NULL);
+ conn = ptlrpc_connection_get(&req->rq_peer, &req->rq_self,
+ NULL);
else
conn = ptlrpc_connection_addref(req->rq_export->exp_connection);
@@ -296,7 +296,7 @@ static void nrs_delay_req_stop(struct ptlrpc_nrs_policy *policy,
DEBUG_REQ(D_RPCTRACE, req,
"NRS: finished delayed request from %s after %llds",
- libcfs_id2str(req->rq_peer),
+ libcfs_idstr(&req->rq_peer),
(s64)(nrq->nr_u.delay.req_start_time -
req->rq_srv.sr_arrival_time.tv_sec));
}
@@ -175,7 +175,7 @@ struct ptlrpc_nrs_request *nrs_fifo_req_get(struct ptlrpc_nrs_policy *policy,
list_del_init(&nrq->nr_u.fifo.fr_list);
CDEBUG(D_RPCTRACE, "NRS start %s request from %s, seq: %llu\n",
- policy->pol_desc->pd_name, libcfs_id2str(req->rq_peer),
+ policy->pol_desc->pd_name, libcfs_idstr(&req->rq_peer),
nrq->nr_u.fifo.fr_sequence);
}
@@ -237,7 +237,7 @@ static void nrs_fifo_req_stop(struct ptlrpc_nrs_policy *policy,
rq_nrq);
CDEBUG(D_RPCTRACE, "NRS stop %s request from %s, seq: %llu\n",
- policy->pol_desc->pd_name, libcfs_id2str(req->rq_peer),
+ policy->pol_desc->pd_name, libcfs_idstr(&req->rq_peer),
nrq->nr_u.fifo.fr_sequence);
}
@@ -2097,7 +2097,7 @@ int sptlrpc_svc_unwrap_request(struct ptlrpc_request *req)
break;
default:
CERROR("error unpacking request from %s x%llu\n",
- libcfs_id2str(req->rq_peer), req->rq_xid);
+ libcfs_idstr(&req->rq_peer), req->rq_xid);
return SECSVC_DROP;
}
@@ -1595,7 +1595,7 @@ static int ptlrpc_server_handle_req_in(struct ptlrpc_service_part *svcpt,
rc = ptlrpc_unpack_req_msg(req, req->rq_reqlen);
if (rc != 0) {
CERROR("error unpacking request: ptl %d from %s x%llu\n",
- svc->srv_req_portal, libcfs_id2str(req->rq_peer),
+ svc->srv_req_portal, libcfs_idstr(&req->rq_peer),
req->rq_xid);
goto err_req;
}
@@ -1604,7 +1604,7 @@ static int ptlrpc_server_handle_req_in(struct ptlrpc_service_part *svcpt,
rc = lustre_unpack_req_ptlrpc_body(req, MSG_PTLRPC_BODY_OFF);
if (rc) {
CERROR("error unpacking ptlrpc body: ptl %d from %s x %llu\n",
- svc->srv_req_portal, libcfs_id2str(req->rq_peer),
+ svc->srv_req_portal, libcfs_idstr(&req->rq_peer),
req->rq_xid);
goto err_req;
}
@@ -1621,7 +1621,7 @@ static int ptlrpc_server_handle_req_in(struct ptlrpc_service_part *svcpt,
if (lustre_msg_get_type(req->rq_reqmsg) != PTL_RPC_MSG_REQUEST) {
CERROR("wrong packet type received (type=%u) from %s\n",
lustre_msg_get_type(req->rq_reqmsg),
- libcfs_id2str(req->rq_peer));
+ libcfs_idstr(&req->rq_peer));
goto err_req;
}
@@ -1779,7 +1779,7 @@ static int ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt,
if (ktime_get_real_seconds() > request->rq_deadline) {
DEBUG_REQ(D_ERROR, request,
"Dropping timed-out request from %s: deadline %lld/%llds ago",
- libcfs_id2str(request->rq_peer),
+ libcfs_idstr(&request->rq_peer),
request->rq_deadline -
request->rq_arrival_time.tv_sec,
ktime_get_real_seconds() - request->rq_deadline);
@@ -1794,7 +1794,7 @@ static int ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt,
(request->rq_export ?
refcount_read(&request->rq_export->exp_handle.h_ref) : -99),
lustre_msg_get_status(request->rq_reqmsg), request->rq_xid,
- libcfs_id2str(request->rq_peer),
+ libcfs_idstr(&request->rq_peer),
lustre_msg_get_opc(request->rq_reqmsg),
lustre_msg_get_jobid(request->rq_reqmsg) ?: "");
@@ -1836,7 +1836,7 @@ static int ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt,
refcount_read(&request->rq_export->exp_handle.h_ref) : -99),
lustre_msg_get_status(request->rq_reqmsg),
request->rq_xid,
- libcfs_id2str(request->rq_peer),
+ libcfs_idstr(&request->rq_peer),
lustre_msg_get_opc(request->rq_reqmsg),
lustre_msg_get_jobid(request->rq_reqmsg) ?: "",
timediff_usecs,