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 F3886803F6 for ; Tue, 10 Nov 2026 17:48:12 +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 6AAHl069017669; Tue, 10 Nov 2026 20:47:01 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AAHl069017669 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="Ye5uVGMW" Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AAHkscS017652 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 10 Nov 2026 20:46:54 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AAHkscS017652 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4ad3d35e899so19516865e9.1 for ; Tue, 10 Nov 2026 09:46:54 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErFK6g44X860z465qb3ufIQJfGA61sotIm8cOqxiickzITZBwv49YYTV2mWvSpNFKdu53JY99A==@openvz.org X-Gm-Message-State: APuU4Z94rXAewBCilzZEptSXirzHdLKUcoW9RYd+QgAgcZ/QgVyAPgT/ Wd0vy1INJ9wojjZrgAU7gZGYve7ZNM6/qacfMpQHtToR48qxLkRbqFqFQIsBz5OCsrL2xjQsUWd mXqm7b9GQfcE7ne4Rs3vMRsYEWpe/G+K+nhrwpk0YN6MWv6U9KvZUDw== X-Gm-Gg: AYBFou3V5HpuHEVxfJXo4rFow+PHA/0MymFJ/8scG8c7h22QOoiCVLW3d52aX6Y+IFf hAuM5RJGIBEb5XTtyocqgsQGwoBIVokZrKnxaPfiNwl/x5tn0WJxjipolYB1Wv7VrqRSmxNSl/V TeOAjgWM2aFSmLKWGOgdabI7G7GEJ0sHKtfaMoIiQnVpRKihEeQOP/mSuXWa1PCE66jwHsOagv2 7SyFdsbbG3qp0PXPaZd8l8SDc+P40RX+ZZsH8SVBbvtptq5maddIL1r74OJ0oGjMl5ruJ1gWx6T MJ7tv/+VpwfBZmTQ2AKs2+HGBwP8nGJukiblT/D0MJ8wLOPRiemmvCdRDetVIUChbzsaXlj532/ lHkA/8CEvzhEw9SaKzA== X-Received: by 2002:a05:600c:1384:b0:4a2:392:9de2 with SMTP id 5b1f17b1804b1-4ba0234ed82mr56611605e9.28.1794332813950; Tue, 10 Nov 2026 09:46:53 -0800 (PST) X-Received: by 2002:a05:600c:1384:b0:4a2:392:9de2 with SMTP id 5b1f17b1804b1-4ba0234ed82mr56611235e9.28.1794332813442; Tue, 10 Nov 2026 09:46:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794332813; cv=none; d=google.com; s=arc-20260327; b=UUbin5nE5Bkbr0gW+VdQgj8R+mb9gEdrlhIOd+rDlOqaFC6MrAJaKZoWnlEzSxfHPo dvPiOYRVmQ2C7Xi6yigDs5PHrr/Ko+MHIh1ZUvjKwyHSNZlgajogTkKnO/aECnyLXlQ8 6HZ+JsB6zeHHydRQt2dhi8AYcQAXEV9JCKbepIlLeXi/WnztAiPYgB7uem0D9lHhrSUv IQuA+bIv9GFbJVLOWlfpjLxNIjxzbgXcXKPCQDJsEJCbi8BZVrVRFHJ6ANEtJfBT09Ej /HHHeez1d9MGKjODyGlkEH7NEgfEPY6mWYOAUHtcm1aKPMBP4dypDg7KGr2VS+msnPT5 pFwA== 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=UWaziB+i2cmAo7cRhz9LdkTc+KrdPv5PhDywFBl6FM0=; fh=NNIHAR0oQq9xcHtG6fvuNrouibWQy9PtHjAIRR7/XzE=; b=XHJpDMgJHQHU8C033CdPwDpWToP+aG7VTyF4G6pxNnI2Sb+/DWLCy+4gCiklBUdLqz 7kKpvAUA7X+LIVamUeAi4ejEFlQSJgQLLQ2d9yvxs8bJ/IjdEn7zTzKyKXvwj+sb+p0q 7UBmQFEUvPbPfltykHNit4uPZWnyuBwI7OT+aDpImiiXWSVGQlVG+MGTvUKnqYiecQVN 22Lauz0h4tNwq+Y69de6jnCdrNH/AeeHjWs5+bmg1osUi8SYVL2ptHacgr/4XlAluvwm P3MPYREnRfjsCArAenwTOhJPFARRD0fYw5ls+4QlINojw9zcfFWhmXD3iLy48K2sCaua cvQQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=Ye5uVGMW; 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 ffacd0b85a97d-49837ccc2f1si6136056f8f.429.2026.11.10.09.46.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2026 09:46:53 -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=Ye5uVGMW; 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=UWaziB+i2cmAo7cRhz9LdkTc+KrdPv5PhDywFBl6FM0=; b=Ye5uVGMWaP7P XT39vlVnBhF/7HfaNm3YzPZsC4eb3Nwk67tFKwEqJAw+1CfOCeONMPS/6EM7FgPOSiN4nsLl60F6t GrduS+dEa05bGZ9JJoyuWvUA36/bpJ7e2eNWgyHwIxnuOQi9alc8cGhcJF0yoHJQ4VbokSsH24f18 ad9gkYR4+WLTcw0JHtjsBEj2PNE9WdwM2nVD51Ot5MUWjpUvqpjwPORQ1xae/etuBo3CgSjDnaUC8 8W3WfeqmGSRE6ftqTt42fL2fmEaicVy9vdB+nb6pfeizVrRxk5IdArltdoWLBUCajUA1LvoIa6XQ9 bS6PCN0K3HTKJc1q+nyRcw==; 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 1xQpri-002Q9Y-2R; Tue, 10 Nov 2026 18:46:42 +0100 MIME-Version: 1.0 From: Konstantin Khorenko To: Andrey Zhadchenko In-Reply-To: <20261109153619.277888-1-andrey.zhadchenko@virtuozzo.com> References: <20261109153619.277888-1-andrey.zhadchenko@virtuozzo.com> Date: Tue, 10 Nov 2026 18:46:49 +0100 Message-Id: <179433280956.3561434.9617315271236803444.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1651; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=ZAzrMMiVfKmOBi+lLwG/seuKizR+fWdYAU6a2Ah1kPw=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBq81iLXWxflLAxVL+MsUfqqTK7RpmOS/zc5I5FG Nw8Q4ojBhGJAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCavNYiwAKCRBRlgpH+WFc Kn43D/96vULDZza2E6F/Xeu3Riy5UeObC2ybtyxpL229ov5tyedfOfnutdIi73ermflzEvNgTtw kyesk4/LzPQTYQyn9gMKHxtwmV7mWQ4P29K916I8ed2ienLC55QFeMQPELzd0RPEMzskoBHaflD nzldi7gm/NbpWDTgnGCJy+yAZ7Tkr1XHwOI9M6Ne+AMddxJPyKkNwFGjeA9asL5kv+b0NbsPHV9 QhrmJ2RWV+lzrrG6VSf5KWKBPZIglkIQcPCHRK9e9ZbAHoKIKrnBdSEpgraF61/zqmLtNPjfdzE Ae6lrVHMKXaDw/3tNMPF7m2j34X9B07717moC5m+FUC1pXhOnj9wuFdRoINETsyKZJ6XYooF/kq N0lqFw9FIgDrhhF0QMZAwe+cgmGRDDztymngLfkwujCr2+i3L/3oEWKATN3DEohQjmpyM5rOqUv buyPWnFGo90gs0iyWSa6fosrhmYHr68FeXMEIR9yuYz3aNABcrsc2tQ7uc6QHcpKPcFKIyno19j PMP6Y2DNLwhruvTISN98ZdK7lC9j9RisXosaJhegZNGolf8UDGQ9a4NMFwgVzl6KRinEyzx5llw rrUHT9iTbjiD/dy9OhA2xGrWYlAplId7zFS8yoQUgJ+9VpRdWUfMmujEjloRuPZ54TJJBIlpie+ B5HMpFvzBOkklww== 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 0/2] dm-qcow2, dm-ploop: do not merge discards with gaps 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 Applying with these fixes on my side: - 1/2: the example replaced with one that can happen on dm-qcow2, with units, plus what the user sees - 2/2: the example replaced with one that loses data on dm-ploop, plus what the user sees - both: "range in the file" -> "range of the device", "always" dropped, why the limit is USHRT_MAX, paragraphs On Mon, 09 Nov 2026 18:36:17 +0300, Andrey Zhadchenko wrote: > Both dm-qcow2 and dm-ploop handle a discard request as one contiguous > range taken from blk_rq_pos() and blk_rq_bytes(). For a request built > from bios [0, 512) and [1024, 1536) they discard [0, 1024), which hits > sectors that were never asked to be discarded and misses part of the > range that was. Read in sectors, a 1024-sector discard request cannot be built on dm-qcow2 with the default 64K cluster: max_hw_discard_sectors is one cluster, and the merge is refused past it. On dm-ploop the example is half a cluster, and ploop ignores discards that do not cover a whole cluster, so nothing is lost there. The patch messages now carry an example per target. dm-tracking and dm-push-backup need the same limit, I filed a bug for that: https://virtuozzo.atlassian.net/browse/VSTOR-154423 Both take a discard request as one blk_rq_pos()/blk_rq_bytes() range, and they inherit max_discard_segments from the origin. Over a patched ploop or qcow2 that is 1, but over an origin with multi-range discard (nvme, virtio-blk) they track the wrong clusters. Please send a separate patch that gives both targets .io_hints with max_discard_segments = 1. -- Konstantin Khorenko, Virtuozzo Linux Kernel Team _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel