mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
librbd/io: conditionally disable move optimization
If the requested write length does not match the provided bufferlist length, disable the move optimization and instead fallback to creating a new sub-bufferlist for the object request. Fixes: https://tracker.ceph.com/issues/49173 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
parent
cbfc083289
commit
8dbb4a3d97
@ -527,7 +527,8 @@ ObjectDispatchSpec *ImageWriteRequest<I>::create_object_request(
|
||||
I &image_ctx = this->m_image_ctx;
|
||||
|
||||
bufferlist bl;
|
||||
if (single_extent && object_extent.buffer_extents.size() == 1) {
|
||||
if (single_extent && object_extent.buffer_extents.size() == 1 &&
|
||||
m_bl.length() == object_extent.length) {
|
||||
// optimization for single object/buffer extent writes
|
||||
bl = std::move(m_bl);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user