]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osdc/Objecter: only post_rx_buffer if no op timeout
authorSage Weil <sage@redhat.com>
Thu, 25 Sep 2014 20:16:52 +0000 (13:16 -0700)
committerSage Weil <sage@redhat.com>
Mon, 29 Sep 2014 20:12:44 +0000 (13:12 -0700)
commit3ebc35026c697ed2b895fdc85f49056a007c7571
tree6707e6402972dece3fd8d074e9e7bf9c1a46a512
parent503f865d6432bead72aac0ffba0539d807f078c4
osdc/Objecter: only post_rx_buffer if no op timeout

If we post an rx buffer and there is a timeout, the revocation can happen
while the reader has consumed the buffers but before it has decoded and
constructed the message.  In particular, we calculate a crc32c over the
data portion of the message after we've taken the buffers and dropped the
lock.

Instead of fixing this race (for example, by reverifying rx_buffers under
the lock while calculating the crc.. bleh), just skip the rx buffer
optimization entirely when a timeout is present.

Note that this doesn't cover the op_cancel() paths, but none of those users
provide static buffers to read into.

Fixes: #9582
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
backport of 126d0b30e990519b8f845f99ba893fdcd56de447
src/osdc/Objecter.cc