linux/net/ceph
Sage Weil 0da5d70369 libceph: handle connection reopen race with callbacks
If a connection is closed and/or reopened (ceph_con_close, ceph_con_open)
it can race with a callback.  con_work does various state checks for
closed or reopened sockets at the beginning, but drops con->mutex before
making callbacks.  We need to check for state bit changes after retaking
the lock to ensure we restart con_work and execute those CLOSED/OPENING
tests or else we may end up operating under stale assumptions.

In Jim's case, this was causing 'bad tag' errors.

There are four cases where we re-take the con->mutex inside con_work: catch
them all and return EAGAIN from try_{read,write} so that we can restart
con_work.

Reported-by: Jim Schutt <jaschut@sandia.gov>
Tested-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-19 11:21:05 -07:00
..
crush
armor.c libceph: Fix base64-decoding when input ends in newline. 2011-03-15 09:14:02 -07:00
auth_none.c
auth_none.h
auth_x_protocol.h
auth_x.c ceph: Move secret key parsing earlier. 2011-03-29 12:11:16 -07:00
auth_x.h
auth.c ceph: Move secret key parsing earlier. 2011-03-29 12:11:16 -07:00
buffer.c net: allow GFP_HIGHMEM in __vmalloc() 2010-11-21 10:04:04 -08:00
ceph_common.c libceph: Create a new key type "ceph". 2011-03-29 12:11:24 -07:00
ceph_fs.c
ceph_hash.c ceph: add dir_layout to inode 2011-01-12 15:15:12 -08:00
ceph_strings.c
crypto.c libceph: Create a new key type "ceph". 2011-03-29 12:11:24 -07:00
crypto.h libceph: Create a new key type "ceph". 2011-03-29 12:11:24 -07:00
debugfs.c
Kconfig libceph: Get secret from the kernel keys api when mounting with key=NAME. 2011-03-29 12:11:19 -07:00
Makefile Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-12-08 13:47:38 -08:00
messenger.c libceph: handle connection reopen race with callbacks 2011-05-19 11:21:05 -07:00
mon_client.c ceph: Move secret key parsing earlier. 2011-03-29 12:11:16 -07:00
msgpool.c
osd_client.c libceph: fix ceph_osdc_alloc_request error checks 2011-05-03 09:28:13 -07:00
osdmap.c ceph: Always free allocated memory in osdmap_decode() 2011-01-12 15:15:14 -08:00
pagelist.c ceph: fix num_pages_free accounting in pagelist 2010-10-20 15:38:23 -07:00
pagevec.c libceph: fix handling of short returns from get_user_pages 2011-03-03 13:47:39 -08:00