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 3574380033 for ; Mon, 30 Nov 2026 16:26:22 +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 6AUGPCS0019672; Mon, 30 Nov 2026 19:25:12 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AUGPCS0019672 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="JpoWlCFi" Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AUGP030019591 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 30 Nov 2026 19:25:01 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AUGP030019591 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-c514c051a65so956661466b.2 for ; Mon, 30 Nov 2026 08:25:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErEvkrlIw9zR5lSb0oE76QvVeK0uLhfCnyKJTK4rbEYvswea54FavVu89V2kOF6OsjtYxaniLg==@openvz.org X-Gm-Message-State: APuU4Z8Qezlwzl9RC/Gp9hHqjV+0utrgr0CJra3KsExekvpEUxcNMFBb TGDUWOSot2xLOvIbVYCwqcqKjXdbCsbYeTfxOTFLpnLaU1SkjsmY6euaRSDywBHlqT94+1U2/Rz Z1bWV8Xs1LItFzYL8YWKeWYDEoZpchtU6AGubs2rMSK4w9bYP9gMmGg== X-Gm-Gg: AZFdTZcMwDtLxRwm2VRvj0K+a5dRblrQhnNvtnPyQiCW6U0LoZi7IzPqKnlL+xCtOXb 0zhIOjL3rIC/f9gJm1s6cAm2t1E516+ik9iWCr6zhV/GU4CU/GaG1tnXy7cWRItgmPa8M8g6GJc JikToSdU8plNEG8w7bA6ruV75Q9IjpD4rP7gUGfMg/vJdAnLHwOZIq/IDtG+/YeVgf+Yzg3wJbV RoDDa9Z1n9aS33lhICJsvg2Bz5AYtP6qJ7K+slsc8BS3WLsNQ2Or8M8Wy6vVjEVDuKE/M7CJ4lU Brr8uzgTy8PVNS7Gq7seNlwb4n3O30K1sA4QaKh+SJT0iExAFN57o+UpmosTgVHvWD6To/vkeZV T1CJEHMu5IuO+kNXbwL+OGLG2+BQ= X-Received: by 2002:a17:907:3f86:b0:c52:20a3:234c with SMTP id a640c23a62f3a-c5220a3266cmr18923666b.14.1796055900316; Mon, 30 Nov 2026 08:25:00 -0800 (PST) X-Received: by 2002:a17:907:3f86:b0:c52:20a3:234c with SMTP id a640c23a62f3a-c5220a3266cmr18920966b.14.1796055899796; Mon, 30 Nov 2026 08:24:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1796055899; cv=none; d=google.com; s=arc-20260327; b=GhKqvGSgOxNsWepzTOyTw441M5UYV4VNftVzcsLn7ZPcel437pbqo2zpMIZqHCNlOw ZQ+XhWEGO5yOglUQDRu6935DKRk9AvtTXtMF2XpAac0qvjO2nGM95nCvpx3s911ik8VG CZUuqkZ1j5epIrgrF3L1iQFyw6T/REp0R5Yxb4TvIQ9dZuDfFj96C7yaC3C10Ukveq2d HeL9tC5+VX40PUa+Eb05lIfMIUbp73VjvWyNlv0QNWlFUWy40rGO5h5Drih7/s5cig9T K7Y3ENZvfGccmFsmta3n/E6lJEQ4WPJD1SIlj9TP4rMWCN6yNDC7zQgPY6ECX83nQ/bF qYnA== 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=z4UGt8kNPkuzIH8lU5ZEnv7tf0zorYxLmCiSLo88Qpc=; fh=CMILZ+goaghq6B4UpCDhf0EQp6kYD0LAlmOkUiVCOvs=; b=UzLKkdHVF1+70lnAfuUB/MbtQ1OP7WKDLEU2yviutF4sthQBL2xYzqNTU/6fB1+1tH P1Lp9f+yZBt/3E45HOMIetsjPb6njggkfdQUgdgKgx+QPMKKm3GtZORb3iHfHW9vLjUP PRPvqvNT3X8vM66o468+mOVsrqFbFGJhW4xGzaeZAaCZ72hUVT+OqjY6trzqOcuCOR7e 2T82TyQ5CDRMbGQGJRde+4bRyNiOdKqgx2LAoAkqSO1+gy03lsRSNHLh4gsR4p57ZW7L d4Ag2XOCiSq6bT88Yg3omsINPYrBrlPUilbyX8shu6QDMskTvgYIb40VrqGtIxdN1Qqz td/g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=JpoWlCFi; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@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-c513afe47b0si2075934966b.56.2026.11.30.08.24.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 08:24:59 -0800 (PST) Received-SPF: pass (google.com: domain of alexander.ivanov@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=JpoWlCFi; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@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=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=z4UGt8kNPkuzIH8lU5ZEnv7tf0zorYxLmCiSLo88Qpc=; b=JpoWlCFimKla I5lEVuWNpls7huzyJ3ydXBdYxgTeF96QvahF/rv7eWzZbBpT2U2jyg8L9iElCFfD9BKj2ClWngWe4 +Id6NV/JkJCQF8D5H1z0MjWRzs/EcodKypjKBTWEvwmGvwmu7C2bhHMP4yJD5AxsI3luBEoVj1lhP Wly4SD6HylyPwKhxmPgeVAZkwdHtwUqyqAuABBpoAlG7OsG087z3FNdJUbmk3OQI2D6MFSpkXiNwn Mk75y2NwV/n/s+0FBAoMoH7YoAVt7jsTO0sJTFkw2lS71DW42VkCFAAEvwDBUlVefRL/v4j0Pp3F3 /1u5AgyszifcGB4sRCxetg==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=sky) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xY4BE-00Gm7s-0S; Mon, 30 Nov 2026 17:24:50 +0100 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Date: Mon, 30 Nov 2026 17:24:49 +0100 Message-ID: <20261130162456.1822406-1-alexander.ivanov@virtuozzo.com> 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.2 v2 0/7] dm-qcow2, dm-ploop: report ENOSPC at once for vhost-blk disks 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 dm-qcow2 and dm-ploop delay a request that fails with ENOSPC, retry it once no request has failed for 20 seconds and report the error with a dm event. QEMU cannot wait for dm events or send dm messages without CAP_SYS_ADMIN, so a VM on a vhost-blk disk is never paused and just hangs until space is freed. ENOSPC of a VM is to be held in vhost-blk instead: it keeps the failed request out of the used ring and signals QEMU, which pauses the VM with io-error and resubmits the request on resume or after migration. For that the error has to reach vhost-blk, so the dm targets get a table argument that turns their delay off. Containers keep the delay. Without the hold policy of vhost-blk, report_enospc completes the request with an error, and the guest gets an I/O error on ENOSPC. Patches 1-3 fix the existing ENOSPC delay of dm-qcow2: - a suspend stalled by a request delayed while the timer runs - a retry postponed indefinitely by new failures - a WARN on a read failing with ENOSPC, fatal with panic_on_warn Patches 4-5 fix the same in dm-ploop: - a retry postponed indefinitely by new failures - a WARN on a flush or a read failing with ENOSPC dm-ploop needs no presuspend fix: ploop_presuspend() already resubmits the delayed requests unconditionally. Patches 6-7 add the report_enospc table argument to dm-qcow2 and dm-ploop. Userspace has to pass it with every table it loads, and the table status shows it. Without that, a snapshot, a grow, a merge or a replace reloads the table without the argument, brings the delay back and the VM hangs again. The series goes on top of "drivers/vhost/blk: fix write zeroes errors, support VIRTIO_BLK_F_DISCARD" v4, and the vhost-blk series goes on top of it. The whole feature needs these series: - vhost-blk: "drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them", already posted - QEMU: "[PATCH hci-8.2 v3 0/5] vhost-blk: support the werror/rerror policies" - ploop.ovz: https://bitbucket.org/openvz/ploop.ovz/pull-requests/530 - libvirt: https://bitbucket.org/openvz/libvirt.ovz/pull-requests/403 v2: - cover letter: say that report_enospc without the vhost-blk hold policy gives the guest an I/O error, and name the vhost-blk, QEMU, ploop.ovz and libvirt series - cover letter: say that dm-ploop needs no presuspend fix, and that before patches 2 and 4 the retry is not every 20 seconds - patch 1: say that 2f9926b51be7 replaced del_timer_sync() with timer_delete_sync_try() - patch 2: arm the timer next to list_add_tail() - patch 3: name the vstorage kio read path and why 12ab90fbc953 kept the WARN on reads - patches 6-7: say that the target version goes to 1.1.0 - patch 6: name the reloads that need the argument and say that the status line of every qcow2 device changes - patch 6: keep the 's' status flag, as dm-ploop shows a pending ENOSPC event the same way - rebase on top of the VIRTIO_BLK_F_DISCARD series v4 https://virtuozzo.atlassian.net/browse/VSTOR-152175 Alexander Ivanov (7): dm-qcow2: always resubmit delayed ENOSPC requests in presuspend dm-qcow2: arm the ENOSPC timer only for the first delayed request dm-qcow2: drop the WARN on a read failing with ENOSPC dm-ploop: arm the ENOSPC timer only for the first delayed request dm-ploop: drop the WARN on a non-write request failing with ENOSPC dm-qcow2: add the report_enospc table argument dm-ploop: add the report_enospc table argument drivers/md/dm-ploop-map.c | 23 +++++++++++------------ drivers/md/dm-ploop-target.c | 9 ++++++++- drivers/md/dm-ploop.h | 1 + drivers/md/dm-qcow2-map.c | 22 ++++++++++------------ drivers/md/dm-qcow2-target.c | 29 ++++++++++++++++++++++++----- drivers/md/dm-qcow2.h | 1 + 6 files changed, 55 insertions(+), 30 deletions(-) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel