mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-26 01:18:36 -07:00
In the context of backup fleecing, discarding the source will not work when the fleecing image has a larger granularity than the one used for block-copy operations (can happen if the backup target has smaller cluster size), because cbw_co_pdiscard_snapshot() will align down the discard requests and thus effectively ignore then. To make @discard-source work in such a scenario, allow specifying the minimum cluster size used for block-copy operations and thus in particular also the granularity for discard requests to the source. The type 'size' (corresponding to uint64_t in C) is used in QAPI to rule out negative inputs and for consistency with already existing @cluster-size parameters. Since block_copy_calculate_cluster_size() uses int64_t for its result, a check that the input is not too large is added in block_copy_state_new() before calling it. The calculation in block_copy_calculate_cluster_size() is done in the target int64_t type. Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Acked-by: Markus Armbruster <armbru@redhat.com> (QAPI schema) Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Message-Id: <20240711120915.310243-2-f.ebner@proxmox.com> [vsementsov: switch version to 9.2 in QAPI doc] Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
||
|---|---|---|
| .. | ||
| accounting.h | ||
| aio-wait.h | ||
| aio.h | ||
| aio_task.h | ||
| block-common.h | ||
| block-copy.h | ||
| block-global-state.h | ||
| block-hmp-cmds.h | ||
| block-io.h | ||
| block.h | ||
| block_backup.h | ||
| block_int-common.h | ||
| block_int-global-state.h | ||
| block_int-io.h | ||
| block_int.h | ||
| blockjob.h | ||
| blockjob_int.h | ||
| dirty-bitmap.h | ||
| export.h | ||
| fuse.h | ||
| graph-lock.h | ||
| nbd.h | ||
| nvme.h | ||
| qapi.h | ||
| qdict.h | ||
| raw-aio.h | ||
| replication.h | ||
| reqlist.h | ||
| snapshot.h | ||
| thread-pool.h | ||
| throttle-groups.h | ||
| ufs.h | ||
| write-threshold.h | ||