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 8F9D680031 for ; Fri, 27 Nov 2026 11:17:41 +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 6ARBGROg022339; Fri, 27 Nov 2026 14:16:28 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6ARBGROg022339 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="bGxEStXR" 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 6ARBG7Gj022249 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Fri, 27 Nov 2026 14:16:08 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6ARBG7Gj022249 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-c50547b4992so557538466b.3 for ; Fri, 27 Nov 2026 03:16:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHIH+MtCd6ulYN8byaZ+MmXhyMx5q81o2nNyezSa1piOIu5yUui1oaBpcljIrP8f4r18qFc4A==@openvz.org X-Gm-Message-State: APuU4Z8gVXnZ87OSHBQTvw54nn93id8MQ3OJJ3lsjX1KtbJ3ay/1PnDL 9UvyjP+oTLjchcoq6JDV6hgB3htxlff+XM1wfgxf9C9qy+dskLXW5NQkDJsm1WfvVVgqXayzjHd vKz8me0MFo8UWm+tgYbUOc/TC+VbBsrudLVIza/vIJ56ZDxIpkd6G6Q== X-Gm-Gg: AZFdTZdnOdtrEnfxHKCzshpO8Pj18dcPn774Zp44gVeheI8WAo0cL9X9WnFI4fSv1Q3 cIdJs7ZY84L7Beuq/jT8ubHqQkNx/sfc1/q3ZL0c49bFUW01xbXdgm5IEJS9mSvXdyZHwBUUr/B uNIRZFSjg1fEYUV5Ut0TKkvzzmiU4lrDE2XLHRFW5shz/zz5nEgEi+d79Uia5k0zpiF3Undapb4 z8SH0jIWK7YronjJ8uEBqfBVFz5qkgkOr5JZYjKapRKArMyDJ3+YvgpeYejxHUDd6cuviedHR3w 0MwMrouRj1TDKHJJCqdM8MtRIIBvR+2nZY32FN/EhSlVlI/kLcFnxAmsFylN+W5hbUidTb07DQM 4znVWfRfTy4ckAGdLwid6eyrVfHs= X-Received: by 2002:a05:6402:1953:b0:6ba:ad05:3fec with SMTP id 4fb4d7f45d1cf-6baad054b87mr12690253a12.29.1795778167620; Fri, 27 Nov 2026 03:16:07 -0800 (PST) X-Received: by 2002:a05:6402:1953:b0:6ba:ad05:3fec with SMTP id 4fb4d7f45d1cf-6baad054b87mr12690226a12.29.1795778167088; Fri, 27 Nov 2026 03:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795778167; cv=none; d=google.com; s=arc-20260327; b=fIXGr9pa0yBOnUfBCk3WbcSHLVyq9Xx9gqw01SLLgkzESkyD71d6KDSpNBzG4Xx9Vy ufmz4m/h1ZZvutixDYXzOiTjX33or4SYxnhhJVsOh5zOm3qkKVMgmc2eCfRJV4eVAzgW DVumRReQB+XeMpfwCEQKvv0RaxDYFmftMkH+LfobphA6o4inMEHvxArnGOnQ20wAX29C mw7PVoZwVCBh/Q0pl2VbJFCsrVGmtuTy6KGQiqgiNschc3HjgdasnY6Cu01X8yX0wIgM 9SUlXTsZw1wedOOp+RZlQso5aKypvz/L7KRO7/GAkbIIzlTsISeKY4t05tvZJBWqFH7G sOKA== 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=O71lJZdr61RH3b/LBM+f0ykQpm4+PcppmoEWP3IDqvI=; fh=CMILZ+goaghq6B4UpCDhf0EQp6kYD0LAlmOkUiVCOvs=; b=MAD8bjlqQG1biX+lkFBpzb1oi4yDnW7TCSER3XRQBLnhlUt6BuB6OFEqx4/FSu8Y+D ngFR2owhzqLxFwQlO2i0aK/9JTG29XFXgMfLCtwvIXYD8CzcredtgomSg1iKgxUGuiVs WrUiKLYsE0rmYLOvDZ8sxRUnFOaPv32loXuXrPAJg8LVyBc3l84OfIo0RMxF5ck0Dpxy lJU+nqL4GHwx4cQSF4/GsX5q6ppq7wlDHfqraYOq9S9hAYPnL+0rhFy4dWqPdRPkPQcp ohb+ntuJJaliF435GpnQ861uNQnLUI1/KI14jXrHQbNnZxFLA0LalhKTvNoofhaTp04W 8kfw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=bGxEStXR; 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 4fb4d7f45d1cf-6bb2049cd31si7414988a12.256.2026.11.27.03.16.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2026 03:16:07 -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=bGxEStXR; 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=O71lJZdr61RH3b/LBM+f0ykQpm4+PcppmoEWP3IDqvI=; b=bGxEStXRkagn MLKkpbGrrYKznHckAfHpQgjLZWqpTscnt1IjLfSjiip4XZ4A0sc8OQs+6gord5uN/NEb2S4C4p5vk /+fqerNG1z2uePb38VUDqtOc9zBP1eEbt6bTXOeuUy6bNaHzhhKgHCEW2k6lOG7arfKo7vVey9A2e PX/Sl3oDkcRGfoNZ+W50Qpj0WsSOEpZgk/LTvw9r/NrDqJoK8adOyug+LYOGnI9TL8OGOZI2YNTTA YethsvLB8PBUKvm8iTSBt2bR7vy/QjC5mANp/A4KoupEU9mX+IOtVCbvqy9xI1IjQVKB7WculpQqz 8DhnE2sZDb20ugeZDoYgkQ==; 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 1xWtvk-007zWP-1X; Fri, 27 Nov 2026 12:16:03 +0100 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Date: Fri, 27 Nov 2026 12:15:59 +0100 Message-ID: <20261127111604.1151696-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 0/4] drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them 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 With report_enospc, dm-qcow2 and dm-ploop fail a request with ENOSPC at once, and vhost-blk passes it to the guest as VIRTIO_BLK_S_IOERR. The guest gets a write error, where QEMU with werror=enospc would pause the VM until space is freed. This series lets QEMU hold such requests in vhost-blk: - VHOST_BLK_SET_ERROR_POLICY selects the requests to hold on ENOSPC: writes (with flushes and write zeroes) and reads - VHOST_BLK_SET_ERROR_FD sets the eventfd signalled when a request is held - VHOST_BLK_GET_HELD_REQS returns the vq and head of each held request - VHOST_BLK_RESUBMIT submits held requests again by vq and head, on resume or on the destination of a migration A held request stays out of the used ring and is not counted as inflight, so stopping vhost-blk to pause the VM does not wait for it. Patches 1-2 move the descriptor chain walk and the request parsing out of the avail ring path, so that a head taken earlier can be parsed again. Patch 3 holds the requests and reports them, patch 4 resubmits them. The series needs "dm-qcow2, dm-ploop: report ENOSPC at once for vhost-blk disks" for the ENOSPC to reach vhost-blk. The QEMU, libvirt and ploop.ovz changes follow as separate series. https://virtuozzo.atlassian.net/browse/VSTOR-152175 Assisted-by: LLM Alexander Ivanov (4): drivers/vhost: split the descriptor chain walk out of vhost_get_vq_desc() drivers/vhost/blk: split request parsing out of the guest kick handler drivers/vhost/blk: hold requests failed with ENOSPC drivers/vhost/blk: add the VHOST_BLK_RESUBMIT ioctl drivers/vhost/blk.c | 290 ++++++++++++++++++++++++++++--- drivers/vhost/vhost.c | 91 ++++++---- drivers/vhost/vhost.h | 4 + include/uapi/linux/vhost.h | 31 ++++ include/uapi/linux/vhost_types.h | 18 ++ 5 files changed, 373 insertions(+), 61 deletions(-) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel