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 C14A280069 for ; Tue, 1 Dec 2026 08:51:43 +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 6B18oIo4021233; Tue, 1 Dec 2026 11:50:19 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6B18oIo4021233 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="ZCQXajOU" Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6B18oDvL021188 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 1 Dec 2026 11:50:13 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6B18oDvL021188 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-c40aa03ded8so170258266b.2 for ; Tue, 01 Dec 2026 00:50:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErGQrmG7qNcIGJarsP1NayVLZ4GEWnCNZJNLKGmxpJfX90t8am8Dx0YvRrCkYSwvI7tvqYHR8g==@openvz.org X-Gm-Message-State: APuU4Z9CgOwxJLxF2e59ha/O2eL8pcNsxeT5THzoMPUgifPHorFkLEGT aR611hL7yoQryoYXD92wIbLKcw04auVXCcTJ+zEg6Rwmsr4ulPTjqEaaa/IvfV1o3W4nsjCa4nQ zQxVuZ4fJyVikv6rssSUyTB3P5O46OIJ3Z0QOoiAhUAy2z1HRzAGtqw== X-Gm-Gg: AZFdTZcQ6n2SNVn3NWujm4v8L+02ICKvAHV5gll5QsA46aqFzxIOz9/i783EVxuk0qT BllSyBlJFgq+h90gTOhlB8urWKWQHgGYP8pnyKyBhsgUN/3miPt9BeJfFrP08B7fd+vyIzGgsF+ 3GsPG3cIf2GuxBaAZED2nAPg9/oopJQwoKsD3FnnGif+csYKpceSECMZocew9NgQwn8USJfCtUt xp3KsOroMRSoKP8AXxIXT5fvH7w+B2ydFFfs/ExBmFi2LppdMNNTNdIqZUmRq1v23OUdYZl1bj7 UUWSPSZ/CGSCUfkRB/m0w+/IMaf6mL2IhhZgMroENWfr1OkURwmHQt7hsDtpmyGuqiEYpxFenyN dhHAv3PyzCsG6Qq1KkC8dTOlEAZ8= X-Received: by 2002:a17:906:f59d:b0:c31:5bb8:4b3b with SMTP id a640c23a62f3a-c513a47d551mr2964977366b.2.1796115012919; Tue, 01 Dec 2026 00:50:12 -0800 (PST) X-Received: by 2002:a17:906:f59d:b0:c31:5bb8:4b3b with SMTP id a640c23a62f3a-c513a47d551mr2964976166b.2.1796115012294; Tue, 01 Dec 2026 00:50:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1796115012; cv=none; d=google.com; s=arc-20260327; b=fVusO+1J+52c8BT2hJbFnxH1Ggr1c2Fh9bkHs8VloMJbBXeITW80jKsZl0/qebU5Ow lADRM4qez9MasDh8p4ZCBH5ye0HSiCtoGNwDVz9JV7DSWZ8APi2Mr1Qo14VXxwo515FV 1tNyFox409mAw6vHJgbOKxOe7fQ85YeLfj5XribdNPAVyIhX1k9G0eqE3ab5oEATBryS cZzsXsfBv4nBrxQJR7N6QG4vz2nHRPN9Rk9I21Wzkm7PX+F7IViEW/j84hD7ai02HAgq N3g9m2jOEZghjP1Q1X29EEixePP4aPBQazGG7u3XP9pA6SO6g9gSL0y7ZFhcz36XHKZV d7tg== 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=9C5NgSjxSzFr+aY+5ltloB7URM2+WY9bvZv9wZbQsXA=; fh=CMILZ+goaghq6B4UpCDhf0EQp6kYD0LAlmOkUiVCOvs=; b=jBNH62mxNnaTYHu8Ly1R8ul5hzrno3EzEW3CPh1g9agoYAIVvJFgh/NvhK3YENZ7Z0 iEwLrLD28vT1h0I7iwHv1gpukjRtlhrFoKRrz8XpWXheDtGPuYNslGNfJumSXTc3RdIS yEnXoJDqZIrI6cQwR1n1UVSlZ9ZmhwPY0DywvCQzlBi8Gdgqd0QSdIYN3BvxBfSy22q0 FLRN7eceFjZTljZa6yRRnEe6c/5DObaqZ26/E1CpaBFLX/UgUwm97HpFPYrbtO1wZU8Z bXpj+4DtEzO3krOz5BYxcXbZeu6YDqut+RG6nrpuwAIXw6IRgZJreHII6N5h83zx0l4E 9VXQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=ZCQXajOU; 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-c51fd75d5bbsi490828966b.32.2026.12.01.00.50.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 00:50:12 -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=ZCQXajOU; 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=9C5NgSjxSzFr+aY+5ltloB7URM2+WY9bvZv9wZbQsXA=; b=ZCQXajOUUGtr jtw6YIA5y/0SV5tkierF/E5NXGcxoQpFJxuwlLBb+fV7eoYBl0XG+LJrt3Bq71mdw5jIJuJm5p7ge 3Pa1L+c490uv/dSh+DouRvHgXAVScrOkDIrxXY0Rt/xZZ9M0fQKKg4azJpKWQ3j8v+bkOF/uSGonR fj/Z0aCEGk+L0dEcMB/5/72sG1oRoJRkuU2+ds1ks93LgDHOz/MCnC167aDTEhq+UeY9ccd5daI1o 8rNEFO8hqfioQi+inlbBNozZHs7dGnfXLqZTirRMK+dq3sB7Wi3zo134L9W42pAMyOXPSBwVoqu/K aVP6J+krMOYewtv+ZSjyvQ==; 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 1xYJYd-000HJA-1i; Tue, 01 Dec 2026 09:50:02 +0100 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Date: Tue, 1 Dec 2026 09:50:02 +0100 Message-ID: <20261201085009.1884844-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 v3 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 vhost-blk series goes on top of this one. The whole feature needs these series: - vhost-blk: "[PATCH hci-8.2 v3 0/4] drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them" - 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 v3: - rebase on top of rh10-6.12.0-211.75.1.26.6.vz10, which has the VIRTIO_BLK_F_DISCARD series 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