From 30ce2bd951340f747c3e762ede773eb26a349f41 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 12 Aug 2023 11:08:50 +0300 Subject: [PATCH] Fix buffer insert in cluster_client --- src/cluster_client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cluster_client.cpp b/src/cluster_client.cpp index 596ebd3c4..4632ef93f 100644 --- a/src/cluster_client.cpp +++ b/src/cluster_client.cpp @@ -581,11 +581,11 @@ void cluster_client_t::copy_write(cluster_op_t *op, std::map 0) { uint64_t new_len = 0; - if (dirty_it == dirty_buffers.end()) + if (dirty_it == dirty_buffers.end() || dirty_it->first.inode != op->inode) { new_len = len; } - else if (dirty_it->first.inode != op->inode || dirty_it->first.stripe > pos) + else if (dirty_it->first.stripe > pos) { new_len = dirty_it->first.stripe - pos; if (new_len > len)