From: "Denis V. Lunev" <den@openvz.org>
To: alexander.ivanov@virtuozzo.com, vasileios.almpanis@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.2 2/2] dm-qcow2: end the popped qio when decompression setup fails
Date: Thu, 19 Nov 2026 15:30:26 +0100 [thread overview]
Message-ID: <20261119143026.998715-3-den@openvz.org> (raw)
In-Reply-To: <20261119143026.998715-1-den@openvz.org>
From: Denis V. Lunev <den@openvz.org>
process_compressed_read() pops a qio and only then allocates the
decompression buffer and, for zstd, sets up the decompression context.
If either fails, it ends the qios left on the list but not the popped one,
which never completes: a read or COW of a compressed cluster hangs,
and so does a backward merge that waits for it.
Put the popped qio back on the list before ending them.
https://virtuozzo.atlassian.net/browse/VSTOR-156064
Fixes: e6bcdf575c18 ("dm-qcow2: support mixed compression images")
Feature: dm-qcow2: block device over QCOW2 files driver
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
drivers/md/dm-qcow2-map.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
index 990896d68016..8f3e89de73c0 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -4116,6 +4116,7 @@ static void process_compressed_read(struct list_head *read_list,
QC_ERR(qcow2->tgt->ti,
"can not allocate decompression buffer:%zu",
qcow2->clu_size + dctxlen);
+ list_add(&qio->link, read_list);
end_qios(read_list, BLK_STS_RESOURCE);
return;
}
@@ -4126,6 +4127,7 @@ static void process_compressed_read(struct list_head *read_list,
arg = zstd_init_dstream(qcow2->clu_size,
buf + qcow2->clu_size, dctxlen);
if (!arg) {
+ list_add(&qio->link, read_list);
end_qios(read_list, BLK_STS_RESOURCE);
kvfree(buf);
return;
--
2.55.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-19 14:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 14:30 [Devel] [PATCH hci-8.2 0/2] dm-qcow2: fix backward merge of compressed clusters Denis V. Lunev
2026-11-19 14:30 ` [Devel] [PATCH hci-8.2 1/2] dm-qcow2: decompress compressed clusters merged into the lower image Denis V. Lunev
2026-11-19 14:39 ` no-reply
2026-11-19 16:45 ` Konstantin Khorenko
2026-11-19 14:30 ` Denis V. Lunev [this message]
2026-11-19 14:42 ` [Devel] [PATCH hci-8.2 2/2] dm-qcow2: end the popped qio when decompression setup fails no-reply
2026-11-19 16:45 ` Konstantin Khorenko
2026-11-19 16:45 ` [Devel] [PATCH hci-8.2 0/2] dm-qcow2: fix backward merge of compressed clusters Konstantin Khorenko
2026-11-19 16:45 ` Konstantin Khorenko
2026-11-19 16:48 ` Alexander Ivanov
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=20261119143026.998715-3-den@openvz.org \
--to=den@openvz.org \
--cc=alexander.ivanov@virtuozzo.com \
--cc=devel@openvz.org \
--cc=vasileios.almpanis@virtuozzo.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox