]> git.michaelhowe.org Git - packages/o/openafs.git/commit
RX: Tidy reader data locking
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 26 Sep 2010 14:48:54 +0000 (15:48 +0100)
committerDerrick Brashear <shadow@dementia.org>
Tue, 5 Oct 2010 19:21:21 +0000 (12:21 -0700)
commit89c018a72fe2528fd2c97d58d0d4396ef4bfed67
tree5702d117b59fb50b175fca913232866fde685a3f
parent67dea45cead2cc9912b744bb5d0255c9e3807219
RX: Tidy reader data locking

Data which is accessed only by the reader thread doesn't need to be
protected by call->lock

Remove the call->lock protection where it isn't required, which makes
certain read/write calls lock free.

Stop rx_ResetCall from manipulating reader thread data. This data will
be zero'd and cleared when the reader thread calls rx_EndCall, and
doesn't need to be reset by the Listener thread.

The change which made rx_ResetCall reset reader thread information
was originally part of 559ea99b. It caused race conditions that were
fixed by adding additional lock protection in d0cc6e, 4dadd2 and
423ab97e. This commit reverts portions of all of those changes. It
is safe to not clear the iovc in ResetCall because any NewCall must
be balanced by a corresponding EndCall in the reader thread, and
EndCall does the appropriate freeing of reader elements.

Reviewed-on: http://gerrit.openafs.org/2856
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit cbaef553978b7d81ba6d7b7721bcea97fe41870a)
Change-Id: I64b315fdc2f6b33b2fe9690060c2f0cca0cc2ae6
Reviewed-on: http://gerrit.openafs.org/2933
Tested-by: Derrick Brashear <shadow@dementia.org>
src/rx/rx.c
src/rx/rx_rdwr.c