From cec5ceab77e22d2001284812f622eb84112b51d7 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 16684115..c486470b 100644 --- a/src/cluster_client.cpp +++ b/src/cluster_client.cpp @@ -565,11 +565,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)