All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH VZ10 v4 00/11] dm-qcow2: improve discard and read-only merge handling
@ 2026-08-27 16:06 Andrey Zhadchenko
  2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 01/11] drivers/md/dm-qcow2: do not attach a bvec to discard qios Andrey Zhadchenko
                   ` (10 more replies)
  0 siblings, 11 replies; 23+ messages in thread
From: Andrey Zhadchenko @ 2026-08-27 16:06 UTC (permalink / raw)
  To: ptikhomirov, vasileios.almpanis; +Cc: devel

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 "update metadata on subclusters discard": 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 I forgot
about it here.

v3:
 - add new "drivers/md/dm-qcow2: do not attach a bvec to discard qios"
patch which ensures discard qios do not have garbage bvecs. Otherwise
COW operations before discard may use these them. Following patches
move discard above COW and alleviate this problem, but let's be
explicit.
 - various commit message and code formatting fixes, but nothing
serious

v4:
 - swap 'allow shared L1 entries during merge from RO image' and
'do discards during backward merge only for writable image' position
in a patchset. Otherwise we will need to add/remove a guard against
merges from image with snapshots.
 - set new_ext_l2 to 0 from the beginning in 'set L2_READS_ALL_ZEROES
after some discards'. Full cluster discard is expected to clear all
allocated bits in ext_l2 too.

Andrey Zhadchenko (11):
  drivers/md/dm-qcow2: do not attach a bvec to discard qios
  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: allow shared L1 entries during merge from RO
    image
  drivers/md/dm-qcow2: do discards during backward merge only for
    writable image
  drivers/md/dm-qcow2: respect zeroes during merge

 drivers/md/dm-qcow2-cmd.c    |  21 +-
 drivers/md/dm-qcow2-map.c    | 415 +++++++++++++++++++++++++++--------
 drivers/md/dm-qcow2-target.c |   2 +-
 drivers/md/dm-qcow2.h        |  19 +-
 4 files changed, 351 insertions(+), 106 deletions(-)

-- 
2.43.5

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2026-08-28 17:05 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-27 16:06 [Devel] [PATCH VZ10 v4 00/11] dm-qcow2: improve discard and read-only merge handling Andrey Zhadchenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 01/11] drivers/md/dm-qcow2: do not attach a bvec to discard qios Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 02/11] drivers/md/dm-qcow2: fix revert_cluster_alloc() for ext_l2 case Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 03/11] drivers/md/dm-qcow2: generalize COW index update machinery Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 04/11] drivers/md/dm-qcow2: update metadata on whole cluster discard Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 05/11] drivers/md/dm-qcow2: never trigger COW or allocation on discard Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 06/11] drivers/md/dm-qcow2: set L2_READS_ALL_ZEROES after some discards Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 07/11] drivers/md/dm-qcow2: update metadata on subclusters discard Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 08/11] drivers/md/dm-qcow2: unmap cluster when discard clears last allocated subclusters Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 09/11] drivers/md/dm-qcow2: allow shared L1 entries during merge from RO image Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 10/11] drivers/md/dm-qcow2: do discards during backward merge only for writable image Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-27 16:06 ` [Devel] [PATCH VZ10 v4 11/11] drivers/md/dm-qcow2: respect zeroes during merge Andrey Zhadchenko
2026-08-28 17:03   ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko

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.