From: Or Ozeri Date: Tue, 5 Jan 2021 18:27:17 +0000 (+0200) Subject: librbd: fix crypto discard handling X-Git-Tag: v16.1.0~87^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=069a8639fb517ffce9fb207219550fc8421b659b;p=ceph.git librbd: fix crypto discard handling This commit fixes a bug in the discard implementation of the crypto layer Signed-off-by: Or Ozeri --- diff --git a/src/librbd/crypto/CryptoObjectDispatch.cc b/src/librbd/crypto/CryptoObjectDispatch.cc index 6b1d42286569..d61c73afbdc8 100644 --- a/src/librbd/crypto/CryptoObjectDispatch.cc +++ b/src/librbd/crypto/CryptoObjectDispatch.cc @@ -590,7 +590,7 @@ bool CryptoObjectDispatch::discard( *dispatch_result = io::DISPATCH_RESULT_COMPLETE; auto req = io::ObjectDispatchSpec::create_write_same( m_image_ctx, PREVIOUS_LAYER, object_no, object_off, object_len, - {{0, buffer_size}}, std::move(bl), io_context, + {{0, object_len}}, std::move(bl), io_context, *object_dispatch_flags, 0, parent_trace, ctx); req->send(); return true;