From: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
Subject: [Devel] [PATCH VZ10 v2 00/10] dm-qcow2: improve discard and read-only merge handling
Date: Wed, 12 Aug 2026 23:19:55 +0300 [thread overview]
Message-ID: <20260812202005.288994-1-andrey.zhadchenko@virtuozzo.com> (raw)
This series makes discard update qcow2 metadata and permits backward
merge from read-only source images.
First patch improves revert_cluster_alloc: this function didn't expect
L2 entries to contain subcluster descriptions (when ext2_l2 is set).
The second patch renames COW machinery to a more general 'replace entry'.
Next five patches improve discard support in general: now it clears
metadata and have a subcluster granularity.
The next two patches support backward merge when the image we merge
from is read-only. Such merges now leave the source mappings and
metadata unchanged. Previously the module ignored file mode and
submitted writes anyway.
Last patch makes merge respect all metadata-zeroed blocks. For now it is
writing zeroes as data, but we will improve this to metadata when we
support REQ_OP_WRITE_ZEROES.
v2:
- patch#6: expand qio_discard_updates_metadata() condition to return
true when backing file is present and fully covered sublcu zero bit isn't
already set (prepare_cluster_discard() already handled this case but
if forgot about it here)
Andrey Zhadchenko (10):
drivers/md/dm-qcow2: fix revert_cluster_alloc() for ext_l2 case
drivers/md/dm-qcow2: generalize COW index update machinery
drivers/md/dm-qcow2: update metadata on whole cluster discard
drivers/md/dm-qcow2: never trigger COW or allocation on discard
drivers/md/dm-qcow2: set L2_READS_ALL_ZEROES after some discards
drivers/md/dm-qcow2: update metadata on subclusters discard
drivers/md/dm-qcow2: unmap cluster when discard clears last allocated
subclusters
drivers/md/dm-qcow2: do discards during backward merge only for
writable image
drivers/md/dm-qcow2: allow shared L1 entries during merge from RO
image
drivers/md/dm-qcow2: respect zeroes during merge
drivers/md/dm-qcow2-cmd.c | 21 +-
drivers/md/dm-qcow2-map.c | 390 ++++++++++++++++++++++++++++-------
drivers/md/dm-qcow2-target.c | 2 +-
drivers/md/dm-qcow2.h | 19 +-
4 files changed, 337 insertions(+), 95 deletions(-)
--
2.43.5
next reply other threads:[~2026-08-12 20:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 20:19 Andrey Zhadchenko [this message]
2026-08-12 20:19 ` [Devel] [PATCH VZ10 v2 01/10] drivers/md/dm-qcow2: fix revert_cluster_alloc() for ext_l2 case Andrey Zhadchenko
2026-08-19 10:27 ` Pavel Tikhomirov
2026-08-12 20:19 ` [Devel] [PATCH VZ10 v2 02/10] drivers/md/dm-qcow2: generalize COW index update machinery Andrey Zhadchenko
2026-08-19 11:05 ` Vasileios Almpanis
2026-08-12 20:19 ` [Devel] [PATCH VZ10 v2 03/10] drivers/md/dm-qcow2: update metadata on whole cluster discard Andrey Zhadchenko
2026-08-19 10:43 ` Pavel Tikhomirov
2026-08-12 20:19 ` [Devel] [PATCH VZ10 v2 04/10] drivers/md/dm-qcow2: never trigger COW or allocation on discard Andrey Zhadchenko
2026-08-19 11:05 ` Vasileios Almpanis
2026-08-12 20:20 ` [Devel] [PATCH VZ10 v2 05/10] drivers/md/dm-qcow2: set L2_READS_ALL_ZEROES after some discards Andrey Zhadchenko
2026-08-19 11:05 ` Pavel Tikhomirov
2026-08-20 9:04 ` Andrey Zhadchenko
2026-08-20 10:21 ` Pavel Tikhomirov
2026-08-12 20:20 ` [Devel] [PATCH VZ10 v2 06/10] drivers/md/dm-qcow2: update metadata on subclusters discard Andrey Zhadchenko
2026-08-12 20:20 ` [Devel] [PATCH VZ10 v2 07/10] drivers/md/dm-qcow2: unmap cluster when discard clears last allocated subclusters Andrey Zhadchenko
2026-08-12 20:20 ` [Devel] [PATCH VZ10 v2 08/10] drivers/md/dm-qcow2: do discards during backward merge only for writable image Andrey Zhadchenko
2026-08-12 20:20 ` [Devel] [PATCH VZ10 v2 09/10] drivers/md/dm-qcow2: allow shared L1 entries during merge from RO image Andrey Zhadchenko
2026-08-21 10:43 ` Pavel Tikhomirov
2026-08-21 10:44 ` Pavel Tikhomirov
2026-08-12 20:20 ` [Devel] [PATCH VZ10 v2 10/10] drivers/md/dm-qcow2: respect zeroes during merge Andrey Zhadchenko
2026-08-19 11:05 ` [Devel] [PATCH VZ10 v2 00/10] dm-qcow2: improve discard and read-only merge handling Vasileios Almpanis
2026-08-21 11:38 ` Pavel Tikhomirov
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=20260812202005.288994-1-andrey.zhadchenko@virtuozzo.com \
--to=andrey.zhadchenko@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