From: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 0/2] dm-ploop, dm-qcow2: fix merge status shared by all devices
Date: Wed, 28 Oct 2026 13:56:50 +0100 [thread overview]
Message-ID: <576277d7-2cf1-4324-896d-129ebb490f59@virtuozzo.com> (raw)
In-Reply-To: <20261027174922.2254893-1-den@openvz.org>
Patches are great but BUG_ON chunks are completely useless. Let's not
add junk. Remove them please.
Other than that,
Reviewed-by: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
On 10/27/26 18:49, Denis V. Lunev wrote:
> 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.
>
> 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
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
prev parent reply other threads:[~2026-10-28 12:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 17:49 Denis V. Lunev
2026-10-27 17:49 ` [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-27 17:49 ` [Devel] [PATCH hci-8.1 2/2] dm-qcow2: fix a merge reporting success after a failed write Denis V. Lunev
2026-10-28 12:56 ` Andrey Zhadchenko [this message]
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=576277d7-2cf1-4324-896d-129ebb490f59@virtuozzo.com \
--to=andrey.zhadchenko@virtuozzo.com \
--cc=den@openvz.org \
--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.