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 0D757803F6 for ; Tue, 10 Nov 2026 18:57:27 +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 6AAIuD5H018182; Tue, 10 Nov 2026 21:56:13 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AAIuD5H018182 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1794336974; bh=Himbl8oTTpXM3xVUyUaZZ6dQlfYOH2XcTV3Bd4mUxss=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=GP2dE0uX7wKyTnFFWKqr3+OUpwt2M5j6Z122fBYHvKEA5w2aqYZB0Uo7JdpJGmb5d 2Cs+dCXNmMhxoTAwFze+DAYJUF6Q4AL7CjujCik2sLLZ++kkQh71hseuzIA1Iwlztt DOLFIUHf0bgycBUjhC7mD6zzpKOCimI332iHcSt/byloHlqSspB0erob+kqAgEf8QN qhsZ4NjO2+8YrRHw6h4eOEkiuQgd7tZE57P5X6am2rwtktSCrFIarinh3dnbxapKxZ KdB+xxytjoLA3WSUeiKf7p2YESxcOdv/8jVRb+z/4VNr0Ng0wOHvIMLRhYozsFKnoU +0Kw7HfPW5TIg== Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AAIu1GO018154 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 10 Nov 2026 21:56:01 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AAIu1GO018154 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="jlqQaU/r" Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4ba078f26f4so4196895e9.2 for ; Tue, 10 Nov 2026 10:56:01 -0800 (PST) X-Gm-Message-State: APuU4Z9m+uKVjt06lqdY9AonYt+UUz79q6IJo5OlQx2LIW/jxqgEK7Ba X6b2S6mcs0fxlOAIYyiQelWcDZffdpk/HK41LuGmI1D/mnlB7VXDDsl07ztuG0LOobiQo57BjvA 3fKWXBxzHLb7oYkUdrGl3K2TiRYJmaM46c0v12j5aR8z1pPZA/XqqhQ== X-Gm-Gg: AYBFou2O05FMQ51h/JBVjIFJOfLOjYw4SQE/gOGGdtBMNewT0Dvp6cRcs1L7Ya0Dh1r z/z7SsCoL9t/IT9aNLdI+mWp20LDKt/3QMF2TNyJB/xB+7gfFLNZPVmtSdEdOK6uR6olqCduHcD lxAUfOo5mOb9IW5wY6O3qnF7riDMkfM0hAeOx7UJckg487haFHydxpzPFlCdwtWk7zcmK3Q0Chk PffkrY+3sPErftFtCIv9SJuE9q0FjZfEyQcrNQJzk8U/rSIEAzrKVEb3NuRW6h9vVUAalJ7UNOJ 6UZsGcBwig== X-Received: by 2002:a05:600c:6309:b0:4af:9cae:df63 with SMTP id 5b1f17b1804b1-4ba09381f2emr632915e9.31.1794336961324; Tue, 10 Nov 2026 10:56:01 -0800 (PST) X-Received: by 2002:a05:600c:6309:b0:4af:9cae:df63 with SMTP id 5b1f17b1804b1-4ba09381f2emr632735e9.31.1794336960899; Tue, 10 Nov 2026 10:56:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794336960; cv=none; d=google.com; s=arc-20260327; b=tDztECReTA7t5nPynTKS69Xvz5rWLwPwcpuuYciHEvVrGk6UZ3BRxMaXBV2tejQbWR L9sj0e3+k3tg+nbDuK5Cb7dG9mlGaH9k7JGVD+l3fgjhccNtF4U2uq/a7ZFLdqcCMOmZ GfxZVFEWYrena2xmIgT19r77U+X5pBUfs0K0YO/i3QK4cd5XlZ/r+o7dusdLj9wg3FB8 Wy/UiREdblVcY8zdJpacERgMOMw3ExVHnjIU+VHuNjvu43trX8AwfJM+bXLZu0OZvYz2 MAlz1qOvlV1uBkL2LKG+Q6NcPwvFsPJ3PcJQW5eAT7JeKQMHfFdIoqvTCwsJVqcQ8Qy4 voFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=KtNkOcLyrODPb1g6Sqn8HLfc8h7zURJ5m6iyLNO5W/c=; fh=ozrYJQ1t3QIP6s65KBq5xgJxiFM2qf+5wwn3ABTusyU=; b=lpzqQm5WNbG6tJKMwrxebtsn/SwAu27cHP+2taS1S2ZY7kQmXzh4y/Jd7ZJ5VcEN+B zAjKwFRjFHv/ntI2B9wASNPOz+9WxqpcE6116ZtjbDFk7dKHRoIWiiM1SzttcpfAJLYF I4iL81N0lXvzyMN1tNAx0QjXTYuK2IP5H38smUYzKDLHAttdwePAj9vA96bu6agk8Kgz McKNu8DteIRWBfonKSOdjM3ImV+sUCpzXv0wViPCm+k+LSHFMQt+bRQ6ibZTX2Q2j4aX 1f7leQ1pX882I9u0Fk3PxQlTyIzFW0Dezzbr0b4m8feC5KuyAK42c1dSpFwdq5Vjf9xI zKzA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b="jlqQaU/r"; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:4f78:6441:d0f1:22af 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-498336a9fa7sor571155f8f.13.2026.11.10.10.56.00 for (Google Transport Security); Tue, 10 Nov 2026 10:56:00 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:4f78:6441:d0f1:22af as permitted sender) client-ip=2a06:5b06:b600:300:4f78:6441:d0f1:22af; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b="jlqQaU/r"; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:4f78:6441:d0f1:22af 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=1794336960; x=1794941760; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=KtNkOcLyrODPb1g6Sqn8HLfc8h7zURJ5m6iyLNO5W/c=; b=jlqQaU/rz/zMA5IohqIBfZfoAJlej2quDXwhF/m45942YWPHaLYdPfskZ9IDix/Teh 4H6FS9uqgFY3xR1T2XnWVyxkK+Xe8jIcUacRQWEWAcpdLaPPs8fL87L37/GRoHSatUBU NppZR7HJypxH5+Hbq7H8d5ldpliu5525wHg2R4YUcFhStEDs8n+8yZ0fbMHWqsJUdG24 PW3d0qojiS46dxg82qfxzjqaIW8Nsh6MJeP4L5cpnoI0q/TFuiiM/f7L6rzkvcNr8HSG ya5brY2TFx5dXdDp8RlXabBw+yiGVd/lkPlc9E5x9radc8J01HRtdSOO6lTPA7+UtFK3 Zbvw== X-Received: by 2002:a05:600c:154c:b0:4a2:59:f568 with SMTP id 5b1f17b1804b1-4ba0936d7b0mr665205e9.14.1794336960382; Tue, 10 Nov 2026 10:56:00 -0800 (PST) Received: from athena.sw.ru ([2a06:5b06:b600:300:4f78:6441:d0f1:22af]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4ba02387ed4sm55207475e9.4.2026.11.10.10.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2026 10:55:59 -0800 (PST) From: "Denis V. Lunev" To: khorenko@virtuozzo.com Date: Tue, 10 Nov 2026 19:55:54 +0100 Message-ID: <20261110185554.2970417-4-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261110185554.2970417-1-den@openvz.org> References: <20261110185554.2970417-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v2 3/3] dm-ploop: fix the flip_upper_deltas check skipping the last BAT entry 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_check_delta_before_flip() means to stop its walk after the BAT page that holds entry nr_be - 1 of the lower delta. It takes the last entry of the page from i after the scan, when i is already end + 1. When entry nr_be - 1 is the first one of its page (nr_be = 1009, for example), the test matches on the full page before it, and the walk stops one page early: a cluster both deltas map at entry nr_be - 1 gets past the check. Otherwise the test never matches and the walk ends with the live BAT, which the previous patch keeps the same size as the BAT of the lower delta. Take the last entry of the page from end, and leave the loop with a plain break. Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver") https://virtuozzo.atlassian.net/browse/VSTOR-153445 Feature: dm-ploop: ploop target driver Signed-off-by: Denis V. Lunev --- drivers/md/dm-ploop-cmd.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c index 5549ba448594..2d1fa449b052 100644 --- a/drivers/md/dm-ploop-cmd.c +++ b/drivers/md/dm-ploop-cmd.c @@ -1161,13 +1161,8 @@ static int ploop_check_delta_before_flip(struct ploop *ploop, struct file *file) if (stop) break; - clu = ploop_page_clu_idx_to_bat_clu(md->id, i); - if (clu == nr_be - 1) { - stop = true; - goto unmap; - } -unmap: - if (stop) + clu = ploop_page_clu_idx_to_bat_clu(md->id, end); + if (clu == nr_be - 1) break; d_md = ploop_md_next_entry(d_md); } -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel