From cc1ae4979ba77153864a39bb45509244dd183813 Mon Sep 17 00:00:00 2001 From: adilger Date: Sat, 27 Apr 2002 08:22:03 +0000 Subject: [PATCH] Add a helper function to abstract the actual location of the UUID, to avoid the need for changes when UUIDs move around. --- lustre/include/linux/lustre_net.h | 1 + lustre/ptlrpc/client.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lustre/include/linux/lustre_net.h b/lustre/include/linux/lustre_net.h index e4c1b0c..1bc7c49 100644 --- a/lustre/include/linux/lustre_net.h +++ b/lustre/include/linux/lustre_net.h @@ -231,6 +231,7 @@ void ptlrpc_link_svc_me(struct ptlrpc_service *service, int i); /* rpc/client.c */ void ptlrpc_init_client(struct recovd_obd *, int req_portal, int rep_portal, struct ptlrpc_client *); +__u8 *ptlrpc_req_to_uuid(struct ptlrpc_request *req); struct ptlrpc_connection *ptlrpc_uuid_to_connection(char *uuid); int ptlrpc_queue_wait(struct ptlrpc_request *req); struct ptlrpc_request *ptlrpc_prep_req(struct ptlrpc_client *cl, diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index d79886b..02f3925 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -42,6 +42,11 @@ void ptlrpc_init_client(struct recovd_obd *recovd, int req_portal, sema_init(&cl->cli_rpc_sem, 32); } +__u8 *ptlrpc_req_to_uuid(struct ptlrpc_request *req) +{ + return req->rq_connection->c_remote_uuid; +} + struct ptlrpc_connection *ptlrpc_uuid_to_connection(char *uuid) { struct ptlrpc_connection *c; -- 1.8.3.1