Whamcloud - gitweb
b=24218 fix race on ksock_tx_t::tx_resid
o=Liang
i=isaac
If a connection is closed before ksocknal_transmit() returns to
ksocknal_process_transmit(), then nobody has refcount on conn::ksnc_sock
and all pending ZC requests will be finalized by ksocknal_connsock_decref->
ksocknal_finalize_zcreq, ksocknal_finalize_zcreq will mark not-acked ZC
request as error by setting tx::tx_reside = -1.
This is race because ksocknal_process_transmit() will check tx::tx_resid
right after calling ksocknal_transmit(), and it can get tx->tx_resid != 0
and rc == 0 then hit later LASSERT(rc < 0).