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 F123A80027 for ; Tue, 24 Nov 2026 13:45:33 +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 6AODi9cp028773; Tue, 24 Nov 2026 16:44:11 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AODi9cp028773 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="oLMfeBHV" Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AODi7k8028768 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 24 Nov 2026 16:44:07 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AODi7k8028768 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-c5101fd59e3so407011266b.0 for ; Tue, 24 Nov 2026 05:44:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErG4swgjRbKtNYqEokIYg9Gu4wnx6/LCtF4I+o5vf8MPqd0iCJ6wsvuhPIpPyU4xJEEroHtZNw==@openvz.org X-Gm-Message-State: APuU4Z+N9v0eAXjOYmM/OiRBulFLJ6jROJ92c0EO9IdDazzXS8JYXA5N XRffUhDA4kFx9UTF2mr4vku5BZY5Kv2NFrS6NJg4+uKo/Wk5bt+SBl0mimdwzLGJkhiQIxcMe3Z t7yGnoC57i08fU9MN0NaJxS4nIZu4ZCWYWFELg3UxB9ATDxgWEU6qQQ== X-Gm-Gg: AZFdTZf8lUOnsvs7MOFxp6oG3dNkG5o4pnt8sPeQsVb9yaR3eNWCVNQCS7Ag3yeUnmI Wy0fpk8na0/XtaR4oIPQ3wox2hvtQnLM+zviET/YN8lPHNy70im9EtOgLpdm3lRN3AwRPOgG9WH q/RHFGaUQ5JZUM3y+FeiaEWUreqm+uvm1AOqcT2ozZHB9i/4Ow/Gmb/psVamwmQniW91Mkhg4Kp /Pxxp+oV9Q6CWSH3Kkq1KlI/Le2fcKQMcg22anivKmykqVDgDk4TGfHh6d7W4KBnszJM/5cg6AQ BFAvO7W7ov96bytMQbOL09c+yzvekG3izvSu/QbrxDH8srw3A2L0XcFs6oIjtZf7bweDZ+OnG4O GYw9OMIlJDiS3xO5l X-Received: by 2002:a17:907:7f91:b0:c50:c04d:cbb4 with SMTP id a640c23a62f3a-c513ac9f641mr1256985166b.43.1795527846939; Tue, 24 Nov 2026 05:44:06 -0800 (PST) X-Received: by 2002:a17:907:7f91:b0:c50:c04d:cbb4 with SMTP id a640c23a62f3a-c513ac9f641mr1256983266b.43.1795527846463; Tue, 24 Nov 2026 05:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795527846; cv=none; d=google.com; s=arc-20260327; b=Ark6ouYs1t5dfuWEig0JiX/wNERovyF8B7N+Q/7NMKg4S5jiD5r+oNDnfGKGTR9lIj 5NA1Q1aCndzr3jYhAFCgUJDRct9nM2cy2HqvdwKY+N8dWGGqfQ7yH7L3ltl63R2HR5zG 1HcsdQdWgo3Q2KKOK9IPiKGQORh//01+VNd045GlSQpxXoc+1+m9P33YOKQvpkVaKKKY oNgtXzSoVBL5enRY9umpQxhhygf/ys0fMVMpsNlWlgTVSG9+khs+9VqCWkmKquQ0zzCI Mzdx15sSmD6ntbIAZsiEA/6hUFWjuBJGkFBx6z4BzENOcrEH02v+taOu3To+xVP+S9cY XsJQ== 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=3h2st9RhFRQSsjNrEhpD4LWF3JjzHssAFgyvMILxIzs=; fh=YDx/sgeCfUIZ9eyfBjqETg92hV70ladS2omuMPCV2do=; b=e1KblzhgQETA1zee03C11/vZ9+oDbDAxZbq7HWp0UFRlOswMbIIr7qsqg1w3wb4Wo2 mw2GexDz+tI/Q0EOM9AYTdoujuYaao0O5Yc3VXtlkOPzhYP54WE90M3XdPuTo7UqSs5r 8XWjKjWB48Q8e0rTfIZgxXxLNKEn0tVsTpSk7TLpEkuyRgyUboV393JSNCAqzICz2UVO 6Ri9EWzZzKOZ2Tw/emWdUrSxcYIJfhfgFjPwpxB0NtuY86VV44ijfs1hwJugheFvnfAg 95qJzqvrioC9L6bP/TsW0el2D4mZBCve68mBLqlI4rqAgNrt2RLDzAJB8JLrBQNijH1z Z3lA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=oLMfeBHV; 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 a640c23a62f3a-c513b036607si902304066b.184.2026.11.24.05.44.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2026 05:44:06 -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=oLMfeBHV; 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=3h2st9RhFRQSsjNrEhpD4LWF3JjzHssAFgyvMILxIzs=; b=oLMfeBHVBa+Z Zl7P5H246ti3FTD/OcpvlNx8Za5CL9yTTKrcvRd5+BPswA3OJJuVnQQITqewW/NdM8/Ya/be/8gq1 91N0+wOGeAqEe0f6TYpNTrPyOM2ROh0O0ER3vfpaxKVQL6kaA1bIYo+E4lI6AFfpNARuRRnenR4lr TAyeKddIYv04mGSGrI0aLZdsdSuP3yA427DXHI7w9Dull99OZyf74VqqlHCUsh9Cv0Ca89qbwy1mH V/MTT09/kSpDYf4jsELfqoSxvuiNRDGN46dkoAZNejyYCu2JOnJ6JrqLamXNhW546SF9/o3ZavPkj 8zqZRjZIpu3uP4bEz3nJ5g==; 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 1xVqoN-000Ced-2y; Tue, 24 Nov 2026 14:43:56 +0100 MIME-Version: 1.0 From: Konstantin Khorenko To: Alexander Ivanov In-Reply-To: <20261124131259.498924-1-alexander.ivanov@virtuozzo.com> References: <20261124131259.498924-1-alexander.ivanov@virtuozzo.com> Date: Tue, 24 Nov 2026 14:44:04 +0100 Message-Id: <179552784464.17420.6667041891082011483.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2294; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=oxM0OPmKUHhg08N4H86PqmWmUprZ1YdsRvNYphjAM94=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBrBZSkXw8Au7FmERmNQP5uNUA2BJRhGL2RrWhGz AVokyOUCdaJAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCawWUpAAKCRBRlgpH+WFc KhKCD/9f/50aJc00bSKF5k1e1cWoziGSR36MPWFgvTS1NBs6KzQhAfsxYvTUAYc/WcfV4ntjn2f BB1mp4SitC31eVUrSeDxrzJ5w6ysnkwMgAybywOuiIeYaTl7W8GDOyTHMFOoUSMIdbC3awPwznA +vchZjNZ9L6XW9XpUl45EAi2cW/DNzAHH1tWvkEU1Zul67sqZ0iOVRxwC+EUmnXaBtz9R8Mp2Mq GOWOrfrsBoK7N+LzeS2FUwp6k2i+U3DULQp4S56GwphsGcRK54Xt9RWpTJ13kkOvAWV873jh+nu Hcq0ge+9i1jXV4CMUJmgIZA0h0Dpj52ll5zivT6mGXnoeNVnz3coreT541grrAoj7hPplA0r6pH mA+Ylj3gZQZ0a+6sSqTthkEXIMe5xVunSh9uiRcb0Y9iyvKDIj2y9eIXDo+YMRr4QK1ZYNAMdB5 mX3zBxHwRSodnSqdtupJ2nj98iCX9xFLFKJsqc//o6atR2D0Gyr5zL4frjQ1oHrXqo3LmPQri/0 VPz4tsw3iS4g79S/NFD0jSGpi71mvGHcwiAhbMD1rXD6KW2pKJiRAVCn60EYJeWZ14sZ98Bt2f+ zbCKfmR7Pck4Ej3P/7DEIrsfyf3GdNP8BRzOo4gZ9UlsevsmNvDbwSxybj6Ghp8J5kLLI9+762N CHU8+BW6DM3W3Hw== 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.2] drivers/vhost/blk: return UNSUPP for write zeroes on a backend without it 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 Tue, 24 Nov 2026 14:12:59 +0100, Alexander Ivanov wrote: > A VMM may therefore offer VIRTIO_BLK_F_WRITE_ZEROES without checking > the limit of the backend, and need not cap max_write_zeroes_sectors at > it. - The code is fine. Change the VMM advice: offer the feature only when the backend supports WRITE ZEROES at setup, just do not cap the limit. - Say in the message that this replaces the contract of 3b2e28a4f6b7 and add its Fixes: line. - Give the dropped nr_sects > max_sects check its own paragraph, and keep each paragraph to four sentences. - Send it in one series with the DISCARD v2, on top of it or under it, with one way to test the op in vhost_blk_req_done(). The next sentence of the message already shows why the advice is wrong: on a backend that never supports WRITE ZEROES, the guest keeps the limit it read at probe for good. dm_kcopyd_zero() then picks WRITE ZEROES, so dm-thin zeroing of new blocks and dm-snapshot fail in the guest, where today they work because the feature is not offered. The QEMU side is not written yet, so this sentence is what it will follow. > splits a WRITE ZEROES bio by it. 3b2e28a4f6b7 ("drivers/vhost/blk: support VIRTIO_BLK_F_WRITE_ZEROES") documented IOERR for a backend without WRITE ZEROES and a limit the VMM sets from the backend; it is in released kernels, so this patch needs Fixes: 3b2e28a4f6b7 ("drivers/vhost/blk: support VIRTIO_BLK_F_WRITE_ZEROES") Dropping the nr_sects > max_sects check is a change of its own: the guest sees UINT_MAX when the VMM leaves the limit 0, so before this patch every request above the backend limit got IOERR. That reason belongs in its own paragraph. The second paragraph has five sentences now, and the -EOPNOTSUPP outcome and the dm-kcopyd failure are each said twice in the message. The DISCARD series (still waiting for your answer to Andrey) rewrites the same condition in vhost_blk_parse_write_zeroes() and adds an op test to vhost_blk_req_done() with op_is_discard(req->bi_opf), while this patch uses bio_op(bio). The two do not apply on each other, so please put them in one series and use one form. -- Konstantin Khorenko, Virtuozzo Linux Kernel Team _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel