From ae68b6a67f8cf39e2a474e2610e50ea55e8e8a50 Mon Sep 17 00:00:00 2001
From: Doug Oucharek <doug.s.oucharek@intel.com>
Date: Fri, 28 Apr 2017 14:44:26 -0700
Subject: [PATCH] LU-9420 lnd: Remove a bad check which slipped in

When the patch for LU-5710 landed, a check for message size was landed
that should not have been.  This check was part of a patch in LU-7650
which was later pulled because it broke things. LU-5718 picked up this
code via its many rebases (it too forever to land LU-5718 which is the
core problem here).

This patch removes that messaage size check.

Test-Parameters: trivial
Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: I3d114ec16cfbfd994efd9aee55e28a09159597be
Reviewed-on: https://review.whamcloud.com/26891
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
---
 lnet/klnds/o2iblnd/o2iblnd_cb.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/lnet/klnds/o2iblnd/o2iblnd_cb.c b/lnet/klnds/o2iblnd/o2iblnd_cb.c
index aa14b1fd9f..908d683a96 100644
--- a/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -1079,14 +1079,6 @@ kiblnd_init_rdma(kib_conn_t *conn, kib_tx_t *tx, int type,
 	LASSERT(tx->tx_nwrq == 0 && tx->tx_nsge == 0);
 	LASSERT(type == IBLND_MSG_GET_DONE || type == IBLND_MSG_PUT_DONE);
 
-	if (kiblnd_rd_size(srcrd) > conn->ibc_max_frags << PAGE_SHIFT) {
-		CERROR("RDMA is too large for peer %s (%d), src size: %d dst size: %d\n",
-		       libcfs_nid2str(conn->ibc_peer->ibp_nid),
-		       conn->ibc_max_frags << PAGE_SHIFT,
-		       kiblnd_rd_size(srcrd), kiblnd_rd_size(dstrd));
-		GOTO(too_big, rc = -EMSGSIZE);
-	}
-
 	for (srcidx = dstidx = wrq_sge = sge_nob = 0;
 	     resid > 0; resid -= sge_nob) {
 		int	prev = dstidx;
@@ -1156,7 +1148,6 @@ kiblnd_init_rdma(kib_conn_t *conn, kib_tx_t *tx, int type,
 		tx->tx_nsge++;
 	}
 
-too_big:
 	if (rc < 0)	/* no RDMA if completing with failure */
 		tx->tx_nwrq = tx->tx_nsge = 0;
 
-- 
GitLab