From: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
To: andrey.zhadchenko@virtuozzo.com
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
Date: Mon, 30 Nov 2026 17:24:49 +0100 [thread overview]
Message-ID: <20261130162456.1822406-1-alexander.ivanov@virtuozzo.com> (raw)
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
next reply other threads:[~2026-11-30 16:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 16:24 Alexander Ivanov [this message]
2026-11-30 16:24 ` [Devel] [PATCH hci-8.2 v2 1/7] dm-qcow2: always resubmit delayed ENOSPC requests in presuspend Alexander Ivanov
2026-12-01 1:08 ` no-reply
2026-11-30 16:24 ` [Devel] [PATCH hci-8.2 v2 2/7] dm-qcow2: arm the ENOSPC timer only for the first delayed request Alexander Ivanov
2026-12-01 1:09 ` no-reply
2026-11-30 16:24 ` [Devel] [PATCH hci-8.2 v2 3/7] dm-qcow2: drop the WARN on a read failing with ENOSPC Alexander Ivanov
2026-12-01 1:10 ` no-reply
2026-11-30 16:24 ` [Devel] [PATCH hci-8.2 v2 4/7] dm-ploop: arm the ENOSPC timer only for the first delayed request Alexander Ivanov
2026-12-01 1:11 ` no-reply
2026-11-30 16:24 ` [Devel] [PATCH hci-8.2 v2 5/7] dm-ploop: drop the WARN on a non-write request failing with ENOSPC Alexander Ivanov
2026-12-01 1:11 ` no-reply
2026-11-30 16:24 ` [Devel] [PATCH hci-8.2 v2 6/7] dm-qcow2: add the report_enospc table argument Alexander Ivanov
2026-12-01 1:14 ` no-reply
2026-12-01 8:07 ` Alexander Ivanov
2026-11-30 16:24 ` [Devel] [PATCH hci-8.2 v2 7/7] dm-ploop: " Alexander Ivanov
2026-12-01 1:15 ` no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130162456.1822406-1-alexander.ivanov@virtuozzo.com \
--to=alexander.ivanov@virtuozzo.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=devel@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.