]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osdc/Objecter: preserve read-into-existing-buffer behavior 26696/head
authorSage Weil <sage@redhat.com>
Fri, 1 Mar 2019 20:12:42 +0000 (14:12 -0600)
committerSage Weil <sage@redhat.com>
Sun, 3 Mar 2019 16:38:53 +0000 (10:38 -0600)
commitaae0e8c0c026fe418fc853067a2cc50bcebf0c3c
tree70948a6bbc6607d3b05ea6f07ca74a954e9d7d66
parent18ff587f1a31a981e6a32c932265ced9cd4b7c49
osdc/Objecter: preserve read-into-existing-buffer behavior

The libradosstriper::RadosStriperImpl::aio_read populates the target
outbl with a static buffer and relies on us reading into it.  This was
actually not reliable in the past (it could fail if the rx_buffers
optimization failed due to a retransmit or something else) but nevertheless
libradosstriper requires it to work *at all*.

Resolve this by modifying Objecter to copy the result into any provided
buffer at the lowest layer.  This should capture any other such user who
needed this behavior.

On the other hand, it will break any user who inadvertantly reads into a
non-empty bufferlist.  Given that any such user would already previously
have seen bad behavior due to the rx_buffers optimization, we expect
there to be 0 such instances.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc