mbox series

[0/7] qcow2: make subclusters discardable

Message ID 20231020215622.789260-1-andrey.drobyshev@virtuozzo.com (mailing list archive)
Headers show
Series qcow2: make subclusters discardable | expand

Message

Andrey Drobyshev Oct. 20, 2023, 9:56 p.m. UTC
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(-)