From 3d190eec8dcfab9672dd218bcc09adb82bc98d1f Mon Sep 17 00:00:00 2001
From: eeb <eeb>
Date: Wed, 7 Jan 2004 20:07:55 +0000
Subject: [PATCH] .  Added an important comment in parse_get()

---
 lnet/lnet/lib-move.c              | 3 +++
 lustre/portals/portals/lib-move.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c
index 6e904ba7e3..d844a7a9a8 100644
--- a/lnet/lnet/lib-move.c
+++ b/lnet/lnet/lib-move.c
@@ -744,6 +744,9 @@ static int parse_get(nal_cb_t * nal, ptl_hdr_t * hdr, void *private)
 
         reply.msg.reply.dst_wmd = hdr->msg.get.return_wmd;
 
+        /* NB call lib_send() _BEFORE_ lib_recv() completes the incoming
+         * message.  Some NALs _require_ this to implement optimized GET */
+
         rc = lib_send (nal, private, msg, &reply, PTL_MSG_REPLY, 
                        hdr->src_nid, hdr->src_pid, md, offset, mlength);
         if (rc != PTL_OK) {
diff --git a/lustre/portals/portals/lib-move.c b/lustre/portals/portals/lib-move.c
index 6e904ba7e3..d844a7a9a8 100644
--- a/lustre/portals/portals/lib-move.c
+++ b/lustre/portals/portals/lib-move.c
@@ -744,6 +744,9 @@ static int parse_get(nal_cb_t * nal, ptl_hdr_t * hdr, void *private)
 
         reply.msg.reply.dst_wmd = hdr->msg.get.return_wmd;
 
+        /* NB call lib_send() _BEFORE_ lib_recv() completes the incoming
+         * message.  Some NALs _require_ this to implement optimized GET */
+
         rc = lib_send (nal, private, msg, &reply, PTL_MSG_REPLY, 
                        hdr->src_nid, hdr->src_pid, md, offset, mlength);
         if (rc != PTL_OK) {
-- 
GitLab