From: adilger Date: Sat, 27 Apr 2002 08:22:03 +0000 (+0000) Subject: Add a helper function to abstract the actual location of the UUID, to X-Git-Tag: 0.4.2~315 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=cc1ae4979ba77153864a39bb45509244dd183813;p=fs%2Flustre-release.git Add a helper function to abstract the actual location of the UUID, to avoid the need for changes when UUIDs move around. --- 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;