From ebb91e10369fb11565a13c3a0a4109aad1680e7c Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 21 Nov 2019 14:06:17 -0500 Subject: [PATCH] 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 --- src/common/options.cc | 5 +++++ src/librbd/ImageCtx.cc | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/common/options.cc b/src/common/options.cc index d7815e3e435..52a93842ae2 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -6952,6 +6952,11 @@ static std::vector