Whamcloud - gitweb
LU-13553 lnd: gracefully handle unexpected events 69/38669/2
authorAmir Shehata <ashehata@whamcloud.com>
Wed, 20 May 2020 05:21:10 +0000 (22:21 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 May 2020 05:05:48 +0000 (05:05 +0000)
commit60f9f539e686fc19b080a3cda15ade7111bbd4a7
tree5ad77cdfca9e9b77eb79929983dc5224d59742ff
parentd4bba4c239ce18d2955b5f39a0ea6bac2413d49f
LU-13553 lnd: gracefully handle unexpected events

When a tx completes kiblnd_tx_complete() callback is invoked.
We ensure:
LASSERT (tx->tx_sending > 0);
However this assert is being triggered in some rare scenarios.
The reason tx_sending would be 0 at this point is because:
 1. ib_post_send() failed but OFED stack is still sending
    a tx complete event.
 2. We're getting two different events for the same tx

Instead of asserting, ignore that tx_complete event and print
the tx pointer and its status.

Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I8cd192538c0c80abaef23a4b6e6906936043060b
Reviewed-on: https://review.whamcloud.com/38669
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/o2iblnd/o2iblnd_cb.c