Whamcloud - gitweb
LU-9119 socklnd: propagate errors on send failure 91/26691/4
authorOlaf Weber <olaf@sgi.com>
Fri, 27 Jan 2017 15:13:53 +0000 (16:13 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 May 2017 00:43:49 +0000 (00:43 +0000)
commit61aa09e1ed8463ccda1f5d83d2c5aff8080a6116
tree850dfdd3204890b7fa59d0b2b588780f9de8504e
parent1612925723908f4eb4bc2cefe677b7825027fe7f
LU-9119 socklnd: propagate errors on send failure

When an attempt to send a message fails, for example because no
connection could be established with the remote address, socklnd
drops the message. For a PUT or REPLY message with non-zero
payload, ksocknal_tx_done() calls lnet_finalize() with -EIO
as the error code. But for an ACK or GET message there is no
payload, and lnet_finalize() is called with 0 (no error) as the
error code. This leaves upper layers to rely on other means to
determine that sending the message did actually fail, and that
(for example) no REPLY will ever answer a failed GET.

Add an error code parameter to ksocknal_tx_done().

In ksocknal_txlist_done() change the 0/1 'error' indicator to be
an actual error code that is passed on the ksocknal_tx_done().
Update the callers of ksocknal_txlist_done() to pass in the error
code if they have encountered an error.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I66b897a31e537e70dcc2622ffdfcc6e96fa93193
Reviewed-on: https://review.whamcloud.com/26691
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/socklnd/socklnd.c
lnet/klnds/socklnd/socklnd.h
lnet/klnds/socklnd/socklnd_cb.c