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 7B18A80E7E for ; Thu, 5 Nov 2026 13:00:10 +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 6A5Cwsnj005059; Thu, 5 Nov 2026 15:58:55 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A5Cwsnj005059 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="sO7ht2xy" 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 6A5CwrPE005051 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 5 Nov 2026 15:58:53 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A5CwrPE005051 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4afef353dd2so26290685e9.1 for ; Thu, 05 Nov 2026 04:58:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AKwUvBxpwh1bHVh+T1a7rZHmY+PjBXu4WGNYCJAlyweJH+NUtDX44yxdU9fVvHiOeKUaawaU043vJg==@openvz.org X-Gm-Message-State: APuU4Z88HjflDisnniptHNyApBPdaaglntirhywhIqHGPKg4wW1c5wVQ GJAh3S36yO5cVodHm7lvabpFfI4TiKUAhuFyI8/WDFj0hHR6XvwRfCsasIOjRp40v2LXFAEK9XS 0ecs9BbznBI5gYcb1/YaW84u1vzysogMjddG1DqocmAANhRsU6qYMvg== X-Gm-Gg: AYBFou1mVAeLv0UeyvkLp3L8wEWVuXURUz2AQuV2GEZEtGBMfx8bH76wcoQ+BOMbFZp GnAg8RCsq4Xz96CGUPLGRYhaTEsV2rRoY3nYrPBOAY4qCP69DJOVl+fSC4+yUrisfBpJmuVJ2As M9l32RDo2LsKpjMLr6PR2SspuM/YMw3pMRAUjlOrvi59u80gxo7m3qqBmNzq7rz5Adx8f+/syYW oPoi+00cDBbjKYEYA3gYLOsu/7Esv5LVO22X8ylvfRkvPLNy/9Ko1e9LYlzkfAPWasSAEl1AEhV BExx7D7tsK8D4Ak+ys1TnfBNL8qHkT2SSA3raiLMTBFtJbawxb6tUtTKuOjvJCDkj6TJaoAE1Td O/De0Sk9LMXISX7knyg== X-Received: by 2002:a05:600c:4e11:b0:4a0:eae0:769a with SMTP id 5b1f17b1804b1-4ac185bc7d0mr414562215e9.28.1793883532967; Thu, 05 Nov 2026 04:58:52 -0800 (PST) X-Received: by 2002:a05:600c:4e11:b0:4a0:eae0:769a with SMTP id 5b1f17b1804b1-4ac185bc7d0mr414561875e9.28.1793883532556; Thu, 05 Nov 2026 04:58:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1793883532; cv=none; d=google.com; s=arc-20260327; b=FVvM/rcRGI12bDkk+i7gNdU28cRhdOdu4IEeUCuExoRlcNSVbuh7Vk/2sHErQr2EPg g93SejDrfLIN/hSOPcYm+iJ1STpp8NTgHJ9tTU+rHXa6fILY2/xzyncNTmuBYU+k5exd 1YnHJtGeWezfg22LagnwcmEGFZCkC6XCUKZZZWpPD0lC+xSKBnI/V6/33s8hHWaCUHaY aea+9H5KtUlv4+x+sE6SXcvMqiqs/RSJY1nFifiI/n5OCrtJVlDYY6a0WQGQQHr9ou// fMl3i8xZMCTWzVn5GVduTWkwF+jIjhIR+Obi/+675wJ3lBixqm4QTqM+VIJky7p8RIAq 1V6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:mime-version:dkim-signature; bh=tYjUoeBFk4p2T75xP3ratjsEDl5yD6UfFj2/RurlijA=; fh=wjIBJwS4A72E5Ce5VjfhniUGUVdfOyxDI2ywJwwowhw=; b=ZV65WfVBMJyYySjBg9OXzw0YjtO6YPKm2yaxp1sOsR4J7Ca9f0yDYyeJ6TfDm6Ij4k EU9HRxQMZbutTgVNSUTQgpNHO3dOqA/a+V4CxSEXh63AWTG429cpwD5vcfSdneAg9NGy YHKCWk2TECKhApPZP/R2oa6GGUF2OGmY98sTtoYHpAJotRfP9DI1I78y3O9VqOgvcY7h MVhaaNa08GvQFbqDbxxfdpXqrINihVqnur09xzEGyI3rast70jaz1YkP9bQDN1E7nZjx NNcZv2pcim2sK26pRgSzmVmXAsXMuSRySJmWzkB/boIqFmI5EVwVezs8Ldxn78uuQuLk /xyQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=sO7ht2xy; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id 5b1f17b1804b1-4b5729cf997si44583605e9.12.2026.11.05.04.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 04:58:52 -0800 (PST) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=sO7ht2xy; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Date:From:Subject:Content-Type: MIME-Version; bh=tYjUoeBFk4p2T75xP3ratjsEDl5yD6UfFj2/RurlijA=; b=sO7ht2xypKvT v+S+2+0Ldbx3ppVU80vl4p+rS3UCe1gRIK32cme9vYReh+/Ji7M7PCVPtI5IzYktrFjLsgRvzwv7P 5DeaOG/AEmHhhIPem4kMphiWf3sJFoPX4dTbSh//+/bB+MbC+hZXzVoCc3riv76DhHbXQ1ht6cn+W kapuSpOgUrNYu26PboEOlNnxhIFc2w0hjg57mpoYeXgG03JgdnI010+K6Cv+qgNGhF6dFkY0poQbk mi8twEsvGBczIhaEfDQAIDbJKu9s64h6B4klbtyW3SA7LYL3GNtMYKckRQHDWRrjUA5VGMCbUP3Cg rq4ilxNWpvPYK1L1NSsktA==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xOwzN-000dV9-2q; Thu, 05 Nov 2026 13:58:49 +0100 MIME-Version: 1.0 From: Konstantin Khorenko To: "Denis V. Lunev" In-Reply-To: <20261104214635.2063009-3-den@openvz.org> References: <20261104214635.2063009-1-den@openvz.org> <20261104214635.2063009-3-den@openvz.org> Date: Thu, 05 Nov 2026 13:58:48 +0100 Message-Id: <179388352809.2823727.15310964921493787995.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1837; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=mXQtSEj1/rpLyUfHbpRr0QK0UReopjS8Gk7UYFZGTnE=; b=kA0DAAoBUZYKR/lhXCoByyZiAGrsfYujophUyJb95BbW8UG59r7n31srM0qGvFFtMzrnz8gCF 4kCMwQAAQoAHRYhBFYPbcg9xdPQY70ILFGWCkf5YVwqBQJq7H2LAAoJEFGWCkf5YVwq7C4P/jxN 0cv60b7n6ADZUnhHQPIYUFSytI0HwiyPJ8aZ4m0AOoQv3NdZBmSDsnphXUEfk6tn2/B0iDwgC6Q ExbArOvorsuEbJ8WwhGUfHmRJzy0w0GitpK9m9ZKYANMELXUjSSbcfrrlc8QTfwJnL+PGkpLRlA YPRwHoxd2APzIDCNJMfXI8iQk9IuUG+vBo0l/xqp74id4w9G6LBg42gImC0UtT5Db5A/P/wDYYO CbRbZL/Sld5e2MLsbHcxfEobvWt8haXlQF5tgVFPOfOD5V4mRE3KijAr76WHMKEeMWMD7xA94J0 oyOq73GVgMSg6kpkuVq3tC0hVeu6cfkzFcVL99EJjQsPEB8FnSqfMc9OTJ/p6ksvocrsoOdH9yG gDLMM6VmszlVkkwiUBTNRHJsU6N4BIW9/ZYdwrzKBdfd4tuNleVUUe7Q8umyY66CEc24amkZdvm OiqizNTye1Nh91UYlBF5f2/sDSk0yRg3aj2XSUJJHeXoe3nmoUkw3Qf+S2/YmPmNRfH+6WOvDj+ tsEbf4laG5nToqfOKKih/2w4Fwg5qFX54I2WhAi80FptQ18yLLT7X2FGjXXLtljHYLho7C6iZCt NAFOL543Bk4BCKrmudwCW4nDdyRoltYnt5xbltiXEYNa/T/4Jj/HGWOESkwmuU/wkhD7Q15e69V /JjRq X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: devel@openvz.org Subject: Re: [Devel] [PATCH hci-8.1 2/2] dm-ploop: fix flip_upper_deltas walking past the BAT of the lower 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 I won't apply this version, please send v2 with the changes below. On Wed, 04 Nov 2026 22:46:35 +0100, Denis V. Lunev wrote: > - clu = ploop_page_clu_idx_to_bat_clu(md->id, i); > + clu = ploop_page_clu_idx_to_bat_clu(md->id, end); > if (clu == nr_be - 1) { > stop = true; > goto unmap; - refuse the flip when the lower delta covers fewer BAT entries than the device (nr_be read from its header < ploop->nr_bat_entries), outside #ifdef PLOOP_DEBUG; keep the `end` fix; - fix "the stop never matches" in the message and split its first paragraph; - optional: `goto unmap` now jumps to the next line, a plain `break` does the same. Item 2 of the cover letter reply. With the `end` fix the check returns 0 and the flip completes with a new top whose BAT is smaller than the device's. After resume the BAT writeback puts the grown header into page 0 of that file and the BAT pages past its old size onto its data clusters, so the image no longer opens. Before the patch this flip oopsed, now it damages the image silently. Compare entries, not pages: fewer entries in the same number of pages gives a stack that ploop_add_delta() refuses on the next load. > after the scan of the page, when i is already one past end, so the stop > never matches. Once the live BAT has more pages than the lower delta, as Item 3 of the cover letter reply. On a full page i == end + 1 is the first entry of the next page, so the old check matches when nr_be + 15 is a multiple of 1024 (nr_be = 1009, for example). The walk then stops one page early and skips entry nr_be - 1. The patch fixes that too, the message should say so. The paragraph has six sentences: the bug, the oops and why the library does not get there are three paragraphs. -- Konstantin Khorenko, Virtuozzo Linux Kernel Team _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel