From: "Denis V. Lunev" <den@openvz.org>
To: andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v2 0/2] dm-ploop, dm-qcow2: fix merge status shared by all devices
Date: Wed, 28 Oct 2026 14:21:02 +0100 [thread overview]
Message-ID: <20261028132104.2885097-1-den@openvz.org> (raw)
dm-ploop and dm-qcow2 collect the status of their merge service I/O in
a function-local static, so every device on the host shares one copy.
In dm-ploop it is never reset: after a single failed fake merge pio,
every later online merge on any ploop device stops after its first pio
and returns that old error until the module is reloaded, which on a
working node means a reboot.
dm-qcow2 resets it when each run starts, which makes it worse: a merge
or L1 COW break starting on one device wipes the error another device
has just recorded. That merge then reports success although a write
failed, userspace completes it and drops the top image, and the data
that never reached the lower image is gone.
The status goes on the stack. The pios/qios carry a pointer to it, so
both loops must not return while one is outstanding: every exit
already waits for the counter to drain, and a BUG_ON after the wait
stops the kernel rather than let a late pio/qio write into a dead
stack frame if that ever changes.
Tested on dev-cl04, 6.12.0-211.52.1.22.9.vz10 with the modules built
out of tree, using test-only module knobs to fail one service pio/qio:
- dm-ploop: after one injected failure, a merge on another device and a
second merge on the same device both failed with EIO; with the fix
both succeed;
- dm-qcow2: a backward merge with an injected qio error, held for 5 s
while a merge on a second device started, returned success; with the
fix it fails with "Can't break L1 COW";
- the ploop pytest suite, ploop and qcow2 formats, passes.
Changes v1 -> v2:
- dropped BUG_ON
Denis V. Lunev (2):
dm-ploop: fix a failed merge failing every later merge on the host
dm-qcow2: fix a merge reporting success after a failed write
drivers/md/dm-ploop-cmd.c | 4 +++-
drivers/md/dm-qcow2-cmd.c | 6 +++---
2 files changed, 6 insertions(+), 4 deletions(-)
base-commit: 02401c5e378f282fbf11bdc65996253ff65dad9b
--
2.53.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next reply other threads:[~2026-10-28 13:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 13:21 Denis V. Lunev [this message]
2026-10-28 13:21 ` [Devel] [PATCH hci-8.1 1/2] dm-ploop: fix a failed merge failing every later merge on the host Denis V. Lunev
2026-10-28 13:25 ` no-reply
2026-10-28 13:21 ` [Devel] [PATCH hci-8.1 2/2] dm-qcow2: fix a merge reporting success after a failed write Denis V. Lunev
2026-10-28 13:25 ` no-reply
2026-10-29 18:01 ` [Devel] [PATCH hci-8.1 v2 0/2] dm-ploop, dm-qcow2: fix merge status shared by all devices Konstantin Khorenko
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=20261028132104.2885097-1-den@openvz.org \
--to=den@openvz.org \
--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.