rx: Don't clear the receive queue when out of packets
authorSimon Wilkinson <sxw@your-file-system.com>
Wed, 12 Oct 2011 13:47:14 +0000 (09:47 -0400)
committerDerrick Brashear <shadow@dementix.org>
Sun, 23 Oct 2011 22:37:01 +0000 (15:37 -0700)
commitf722a75fe21963d64217375f1f7bbb0eb14befb4
treed402b111e62acc965e0407a7aa103dc8066f69c0
parent735873d51512bc31134856c06345bb7caf9d8144
rx: Don't clear the receive queue when out of packets

We can end up discarding a receive queue that's been soft acked,
effectively taking back soft acks we sent. Whilst the RX
documentation says that a client can drop soft acked packets at
will, our RX implementation assumes that if the final packet in
a call has been soft acked, we won't clear the queue. If a client
clears the queue in this situation, the call will hang.

What *should* happen is that we should take necessary locks,
confirm that we have not soft-acked all of the packets in a flow,
and then discard, or, if we're just going to discard, error the
call.

Change-Id: Ic8e358b8648c1a6f0154009093468531a9e3cf74
Reviewed-on: http://gerrit.openafs.org/5603
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/rx/rx.c
src/rx/rx_globals.h