From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 3FE018017D for ; Wed, 4 Nov 2026 18:56:48 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6A4Itcp4026222; Wed, 4 Nov 2026 21:55:38 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A4Itcp4026222 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1793818539; bh=ImbEdkGEVCj9HRLsKL3ocRDSJwSO3uyEs4kysAvVaug=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe; b=ibITaFWJ5OmFv7KhDzfowqG72jO0U7U4j3IB6UVaebUAHWnssxwADbUGbMXfC+LFB WhzBqTgJQO4ParFxtVnoHNMjMV/WnFEKRH1k/sacUJGHRvrfGmTNd+h0epkwQ97CDq djLL1a/BB7nU/C+IxxhDhpaCI5ehLHuGqVWjNLLLARbiwXdcwESAcyJ8t+ot9HBvk6 IYewgTYN6vWJRNZias78mVQiwuPJ6bcxnU1L9VT83EuC/zrh1X3FasN09yy+vLP/UM Nqiqqa+rZ2zTuBowOTalxcUZOMJS+YeghYONnDr+GwECgk6Q1OBYhyn3XbkHxfRjFx 1RVB6zu/B7IBA== Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6A4ItZec026203 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 4 Nov 2026 21:55:35 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A4ItZec026203 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="SIMHsC7r" Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-48dea677afcso544774f8f.1 for ; Wed, 04 Nov 2026 10:55:35 -0800 (PST) X-Forwarded-Encrypted: i=2; AKwUvBz5+8xldQ9VAj4E5iPMcK+ayleR7jtvl1FhBiQgDd0h9zaWf3eeLph6NEvbqsFB8r+/a65zVA==@openvz.org X-Gm-Message-State: APuU4Z+UM02q0FpaAZ1SSmwA+g82k8RtwF5fvzKmqgoBpZQCBj0PRwpT kn3d+NCNVBl6XwatGJ0dMBEjXKF5457YJ+DtuEqGK2wLvacb54XQfXAwdLDEYbtL0NEc+/cVMVB C8Q4YzvztuKoDddzQUlsRQyyS2UiIpSzdlINhBM/Z+vHouSp0fX9Xtg== X-Gm-Gg: AYBFou0tzfmlaralsY6NR3n9cxo5Nx9dvNSwvg08dtp+WTUD6TNU1+bRXdMhMjT5RqG iVIYROc8Gvg6TZpNas4qvLrf29gBkT2/WB6gdNZAurpspJH+Z6FGEg092bb8405rGT2hT3txYHm MfVS1JETAqJAxHDCJzdU6eUWC6+F7j9xBYP4hyjXeyX8rLRvtEpBmjXkq30/fSsvrgsAlo/kIz7 8b/SMij/Ig2Jm1pLCR4TD0+y28u2qhBmRM4xCWHzKR4j1fYU6KpuGHR9Pc4dNc6XrJKFIe3ZkiP hl8FoHYuGg== X-Received: by 2002:a05:6000:4804:b0:48e:22fd:1ea3 with SMTP id ffacd0b85a97d-4911aa56dc1mr522120f8f.28.1793818534860; Wed, 04 Nov 2026 10:55:34 -0800 (PST) X-Received: by 2002:a05:6000:4804:b0:48e:22fd:1ea3 with SMTP id ffacd0b85a97d-4911aa56dc1mr522097f8f.28.1793818534403; Wed, 04 Nov 2026 10:55:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1793818534; cv=none; d=google.com; s=arc-20260327; b=O/MqH62489nZCT2ivE72wK0yWMAIokQBcYMHPO+ulMQ7Wbc3n98mcBRdd9hXedogDA 1QKm85DQ7TPdK01AKmwJCrH6389Vn5FY7sf7ID0908go0OTfv+f/iQvC40Fk0t/R/X8V MlpCeR/YJKUjwlPTWsYyGE+rzLTb0GIuhrOPNZk1C6CVEqoHux208wEaFLDta3R6tlqW u8MEG6KhSZ6aXONA9NzxV7Vx/h0UDziHawfGj7CiCJ7NYD1X2JbnEWKIquvzoBbjE5oU eQfmTdbfTaZIvs0mk14/pLTnpL8DhWxasJ9gJBRykZ07Ml3kloQZj76TIXwkY+44gRy6 GekA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=F8jNdgc0r0tqjk3scLkhjLRs16Qca+MH3LfOGx+Sls8=; fh=180STV68AbB9wRWwFPyy3TLuQes7PxxNpj9voK5cSbM=; b=TBIgyZA6QajEUq83neWPPrf3KMXMPvL/oeSiIlp3E6Oogu118OBq6hByEN7XIdIdBc UiJJY+amSg4ncJkt23IQxVnfqztpzUdtgNSuOGlOywA8WiIIDt/raRU3YxkAQ4endzdB sv1O3fjoj1azvbvjxSBLSnDDEG7vwTGEUcHKZq0pmXhLVIDrcwMeZaBJm/gE3V3/EjXP oIfAemjHukIJYB6HabKTLObsxQki4wGcZxJHd8h3xRe72P2nU+4P7EthNlR12+5L1Qht PZ6QE4Kh2L7tbzNOdBT8lHU/c02H4TiJaA4Ez/bj25gfBu5sP+15x7ZzlvZbvLv5wR4g oRGQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=SIMHsC7r; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:162e:5a6e:fd46:18b7 as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-491262860c7sor44102f8f.1.2026.11.04.10.55.34 for (Google Transport Security); Wed, 04 Nov 2026 10:55:34 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:162e:5a6e:fd46:18b7 as permitted sender) client-ip=2a06:5b06:b600:300:162e:5a6e:fd46:18b7; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=SIMHsC7r; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:162e:5a6e:fd46:18b7 as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1793818534; x=1794423334; darn=openvz.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=F8jNdgc0r0tqjk3scLkhjLRs16Qca+MH3LfOGx+Sls8=; b=SIMHsC7r4c/4aiQeR8LJO+GIWU50yhysp8fYDMhcRIETRtWcjM6DSge3YtGUx/B64S 90uzqYLza6FLHT31EZ7D60VGl1MSaGdmKzy99KCyKDvUvkcxQhYEePLxAmHoYTjPr4Ku h8HPjJO6Z8tdbV5zpFbj5O1+VN0Lpim7YE6mbC2XZzOVnAO6p17kvymyN5/nKI0M495A 4DWQPLqjKpmLbGDJZ2lbzpRNbWE8wwtDStqFIOCpq1VYg7WW3l9OLTjYhXBw73NabZPu 6UbMwjyuEkBaWsRC71WmN5UTjKaMw2xQ4hlLP7Rf5qp2WNFRpym9TfhcO937dmdgGo6j KACQ== X-Forwarded-Encrypted: i=1; AKwUvBzwP9wrS+GjR2uPOKN+KDffTsrPcIcAjChL7BevFr7Z+yRdFjCEwcJ2zIrwjwpRrw++3NDvfQ==@openvz.org X-Received: by 2002:a05:6000:1788:b0:48e:6c3f:f7b2 with SMTP id ffacd0b85a97d-4911a496786mr560243f8f.23.1793818533869; Wed, 04 Nov 2026 10:55:33 -0800 (PST) Received: from athena.sw.ru ([2a06:5b06:b600:300:162e:5a6e:fd46:18b7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48fecf8ef85sm5927588f8f.27.2026.11.04.10.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2026 10:55:33 -0800 (PST) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com Date: Wed, 4 Nov 2026 19:55:31 +0100 Message-ID: <20261104185531.1870776-1-den@openvz.org> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1] dm-ploop: fix a forward notify_merged updating the wrong delta X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Denis V. Lunev ploop_delta_clusters_merged() rereads the delta that took the clusters, deltas[level + 1] for a forward merge, and stores its file_size, file_preallocated_area_start and nr_be after notify_delta_merged(). By then notify_delta_merged() has moved the deltas above @level one slot down, so the values land in the delta above the one they belong to, and that one keeps its sizes from before the merge. With level == top - 2 the top delta gets the sizes and nr_be of the delta below it. The sizes drive the preallocation of whichever delta is on top, and nr_be bounds later merges into a delta, so both deltas are left with wrong values. The ploop library sends only notify_merged_backward, so this takes a direct dm message. Store the values into deltas[level] for a forward merge. A backward merge changes the delta below @level, which does not move. Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver") Reported-by: Konstantin Khorenko https://virtuozzo.atlassian.net/browse/VSTOR-153426 Feature: dm-ploop: ploop target driver Signed-off-by: Denis V. Lunev --- drivers/md/dm-ploop-cmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c index 645c5136e7ba..196cd7da306c 100644 --- a/drivers/md/dm-ploop-cmd.c +++ b/drivers/md/dm-ploop-cmd.c @@ -918,6 +918,9 @@ static int ploop_delta_clusters_merged(struct ploop *ploop, u8 level, notify_delta_merged(ploop, level, &md_root, forward, nr_be); + /* notify_delta_merged() moved the deltas above @level one slot down */ + if (forward) + changed_level = level; deltas[changed_level].file_size = file_size; deltas[changed_level].file_preallocated_area_start = file_size; deltas[changed_level].nr_be = nr_be; base-commit: 95ab11e2c57e8468412ca586d4be8cd75b6bfbf0 -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel