[PATCH 0/7] qcow2: make subclusters discardable

Andrey Drobyshev posted 7 patches 6 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231020215622.789260-1-andrey.drobyshev@virtuozzo.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
block/qcow2-cluster.c        | 217 +++++++++++++++++++++++++++++------
block/qcow2-refcount.c       |   8 +-
block/qcow2.c                |   8 +-
block/qcow2.h                |   2 +
tests/qemu-iotests/250       |   5 -
tests/qemu-iotests/271       |  25 +++-
tests/qemu-iotests/271.out   |   2 +
tests/qemu-iotests/common.rc |   6 +
8 files changed, 226 insertions(+), 47 deletions(-)
[PATCH 0/7] qcow2: make subclusters discardable
Posted by Andrey Drobyshev 6 months, 1 week ago
This series extends the discard operation for qcow2 driver so that it
can be used to discard individial subclusters.  This feature might prove
useful and gain some host disk space when dealing with the guest
TRIM/discard requests, especially with large clusters (1M, 2M) when
subclusters are enabled.

Andrey Drobyshev (7):
  qcow2: make function update_refcount_discard() global
  qcow2: add get_sc_range_info() helper for working with subcluster
    ranges
  qcow2: zeroize the entire cluster when there're no non-zero
    subclusters
  qcow2: make subclusters discardable
  qcow2: zero_l2_subclusters: fall through to discard operation when
    requested
  iotests/common.rc: add disk_usage function
  iotests/271: check disk usage on subcluster-based discard/unmap

 block/qcow2-cluster.c        | 217 +++++++++++++++++++++++++++++------
 block/qcow2-refcount.c       |   8 +-
 block/qcow2.c                |   8 +-
 block/qcow2.h                |   2 +
 tests/qemu-iotests/250       |   5 -
 tests/qemu-iotests/271       |  25 +++-
 tests/qemu-iotests/271.out   |   2 +
 tests/qemu-iotests/common.rc |   6 +
 8 files changed, 226 insertions(+), 47 deletions(-)

-- 
2.39.3