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 8ACCF8017D for ; Tue, 17 Nov 2026 10:11:49 +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 6AHAAaHK007785; Tue, 17 Nov 2026 13:10:36 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AHAAaHK007785 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="hLjq/sV1" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AHAAUcX007740 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 17 Nov 2026 13:10:30 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AHAAUcX007740 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48e0af48c18so2972643f8f.2 for ; Tue, 17 Nov 2026 02:10:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErGZX7wLwjd2nTexTTSE76q++yAjdiguq1dpMRSh+eHupauY5A4HIHGfX1EeRgx3WFYWvxpbSQ==@openvz.org X-Gm-Message-State: APuU4Z9ODiygBeZxG/7NGM1uE8BZnaZ3tGcyHAAiFfhTw/inCJnbrXOn lLuDVOtYCj5sSx9Crs+94tXLz1jMSWTaaW8nd7GDGFhKTU9Dlp+N2jF64IZUYYS6SjJjw7zWYH+ GJGtfHpNrK4DX7M1DOUFiQSFJq3SkJ3olOF146Pc7U4n42EaldDGgig== X-Gm-Gg: AZFdTZebVvIPKtLF781W86agRq0aY4DX0n8Z1uzbEWH6NEZzI3Q0u2fj7lARhm1TXXx IT8cQ/0A6Bd5UgbzOj1n6/lYergER1JAhtPd+kVkoCp5M5Sl2IIkRknmaPzFdNScylaFeNw8/Yh /wA/7acX9G3WFpa9uaEFJ8GUFBMaOhQQM5bTbDPuk9/MNpvnKyc9iuifHsxjPWm3BYDqiOvMiqn iE41wxhrSIBSiPq6ZTOjVDX1PKi3aOwl6Xrbnmc7gsKc2mZTLiOwexYDiGyBZH3EF96dUecFuEV NjHS03SsKePjxVNZ6JxQMKfNVdWbIXDqTzDVlTyPzm5IPnJc+WImzYGbhD5hmUHHIGf8heglNnn mEMVO3lSkcGHFvLkjgOo/8Au3erty X-Received: by 2002:a05:6000:290c:b0:48d:ffcb:28e1 with SMTP id ffacd0b85a97d-49c70b05138mr31082970f8f.11.1794910229759; Tue, 17 Nov 2026 02:10:29 -0800 (PST) X-Received: by 2002:a05:6000:290c:b0:48d:ffcb:28e1 with SMTP id ffacd0b85a97d-49c70b05138mr31082897f8f.11.1794910229170; Tue, 17 Nov 2026 02:10:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794910229; cv=none; d=google.com; s=arc-20260327; b=hfvP91SHwFZiSukBcX0eQjzPHM/+j1hFtL4lHB1C7ms/b1LBVTOl6SVjVFRE0DtmXU UjOUIM/AnmUhHDLpX2+MMn8d+6ks0Zt1orPByYX5upaTyeT5yGgk1LDDLLZpAawRTYZ/ 6JXZLnGDX5ZkXoyqQ4HngAEPInK/MR0u/8CSsgtHH+1ORVXfknofSeQBoa4rMgoCESs+ uyRwwH2raAS78aNGnj+Zhl+1f13t4z+uwlLZuNGQOw9oBfnN3NuGr6EBFpVXCPbf5BGA S6Sq2asFKfQTGF2ZJaRYTmtvKZ4G7I03oVkPW+82WgIcwpD+5g3iS6IhDxjkVZU499LO qYQw== 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=N2XYo0jt+JLvjqdNr95MlwhnRhe5yKwB/WnibehY3VQ=; fh=CMILZ+goaghq6B4UpCDhf0EQp6kYD0LAlmOkUiVCOvs=; b=Z4v2PrEKZTkfhP3mYoh/Q+P57pxs0kuWvXm6x8Lr99EfQzfKt0PMrbIszgeADUnr2u KBX/jQO2TiAqdQfh5uO4NvmCADeYGpU8a0jMC7UbRT02rMLGZsfsUMZPdibSh2Gau6CG aamSVp9ydZHnvmuL/mSAL5VSL/+3m5MRicqoYjqpOIShVoQx+PsApcRVyfdhL6rWIFi5 pw4HJqkEdW8v/cw/MzeC7Jy/OYOdQpGVsxNpIXnezZSCsTVHlrK5J441p+uD+qj6zD2O nputEsam/4WfgN+iuDnA+KZQ7goTtPRrUkEK2fUPQUERgqpahXrQ5BEtxkzz9Xgicb1b 9plA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b="hLjq/sV1"; 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 ffacd0b85a97d-4a4de4cb67esi1748812f8f.422.2026.11.17.02.10.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2026 02:10:29 -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="hLjq/sV1"; 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=N2XYo0jt+JLvjqdNr95MlwhnRhe5yKwB/WnibehY3VQ=; b=hLjq/sV1AI37 m5++h6iy0fUHf7FY3vGSocPAzE36cfns9aJGM5N/5hBArJiNd/XU5EQcweHGENanTBKK4VbcRpNbA LnUTTrzqvSD5mS9OFnphEu83jde3hknpxS5Cnrk9vcL3uRIKRqhg70sTWCnH9yljecflFmJsaMIXm TIXKBcaROo7I4+KoItmcw6CJkSrrh3+1+S75SxBCPvKTxOOT7E9fTYWL1wivh8RoU5ZEUtcJZtq5A td1QJ+4t2r0ENywUzjYnQQFD12AWzNTCRoAg6kdL4AaT6M7d7kau7QUgmQ1snkciKp4yz88dO9cST SmE1uP82EuULebkfAmxQcg==; 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 1xTG4i-009Isp-1o; Tue, 17 Nov 2026 11:10:19 +0100 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Date: Tue, 17 Nov 2026 11:10:17 +0100 Message-ID: <20261117101026.3071579-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.1 v2 0/9] dm-qcow2: support the werror/rerror policies 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 QEMU disks have the werror/rerror policies: on an I/O error either report it to the guest, or pause the VM and retry the request on resume. A vhost-blk disk completes requests to the guest from the kernel, so QEMU never sees the error. This series lets dm-qcow2 hold a failed request according to the policy, tell QEMU about it, and retry or fail it on request from userspace. Patches 1-2 fix the existing ENOSPC delay: a use-after-free of the event work and timer on destroy, and a suspend stalled by a request delayed while the timer callback runs. Patches 3-4 rename the ENOSPC delay list to a held request list and arm the retry timer once per hold, so new failures do not postpone the retry of the held requests forever. Patch 5 sends an IO_ERROR change uevent when requests get held, as QEMU cannot wait for dm events without CAP_SYS_ADMIN. Patch 6 adds the resubmit and fail_held messages, so libvirt can retry the held requests on VM resume and drop them on VM destroy. Patch 7 adds the error_policy=, table argument with the report, enospc and stop policies. The default keeps the current behaviour for writes. Patch 8 requeues held requests to the dm queue on a noflush suspend, so a table reload or a snapshot of a paused VM does not deliver the error to the guest. Patch 9 fixes a vhost-blk hang on release when the vhost worker was killed with I/O in flight, which a VM destroyed while its requests are held runs into. v2: - patches 1, 2, 4, 9: add Fixes tags - patch 5: state that held ENOSPC reads are reported too, and that every dm-qcow2 device whose storage stays full now gets a uevent on each retry - patch 7: drop the misleading "whatever the error" from the message - patch 8: note that ploop needs the ploop.ovz change "lib: suspend unpartitioned dm-qcow2 devices with noflush" to get the requeue on a snapshot or resize https://virtuozzo.atlassian.net/browse/VSTOR-152175 Alexander Ivanov (9): drivers/md/dm-qcow2: cancel the event work and ENOSPC timer in the destructor drivers/md/dm-qcow2: always resubmit delayed ENOSPC requests in presuspend drivers/md/dm-qcow2: rename the ENOSPC delay list to a held request list drivers/md/dm-qcow2: arm the hold timer only for the first held request drivers/md/dm-qcow2: report held requests with an IO_ERROR uevent drivers/md/dm-qcow2: add the resubmit and fail_held messages drivers/md/dm-qcow2: add the error_policy table argument drivers/md/dm-qcow2: requeue held requests on a noflush suspend drivers/vhost/blk: fix a hang on release after the vhost worker is killed drivers/md/dm-push-backup.c | 2 +- drivers/md/dm-qcow2-cmd.c | 32 +++++++++- drivers/md/dm-qcow2-map.c | 110 +++++++++++++++++++++++++++++------ drivers/md/dm-qcow2-target.c | 104 ++++++++++++++++++++++++++++----- drivers/md/dm-qcow2.h | 26 +++++++-- drivers/md/dm-rq.c | 4 +- drivers/md/dm-rq.h | 2 +- drivers/vhost/blk.c | 52 ++++++++++++----- 8 files changed, 274 insertions(+), 58 deletions(-) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel