]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: disable zero-copy writes by default
authorJason Dillaman <dillaman@redhat.com>
Thu, 21 Nov 2019 19:06:17 +0000 (14:06 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 2 Dec 2019 16:15:12 +0000 (11:15 -0500)
commitebb91e10369fb11565a13c3a0a4109aad1680e7c
tree966195abb0d562fc53143406a6c88e113040355e
parent1d866ef37df4a1f3680d87d415df8131fdbcb023
librbd: disable zero-copy writes by default

Add a new configuration option to allow a client to opt-in to zero-copy
writes if they can guarantee that the provided buffer will remain
stable while the IO is in-flight.

For example, QEMU cannot guarantee stable writes since it DMAs guest OS
memory through to a librbd AIO write request if not using a bounce-buffer,
and the guest OS is free to continue to modify the affected page(s) since
it will remain flagged as dirty and will eventually re-issue another write.
However, the CRC computed by the Ceph messenger layer will detect the
change and it will result in an endless session reset loop.

Fixes: https://tracker.ceph.com/issues/42889
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/common/options.cc
src/librbd/ImageCtx.cc