The qcow2 read/write functions do their own fragmentation (because of cluster remapping); while we could advertise s->cluster_size and let the block layer do fragmentation for us, that would NOT solve the issue of the block layer handing us a length less than a cluster but at an offset which overlaps a cluster boundary. Thus, we still have to fragment ourselves, at which point it is easiest to just document that this driver is 64-bit clean.
Signed-off-by: Eric Blake <ebl...@redhat.com> --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index 0b5ad130060..1dd3491f77f 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1687,6 +1687,7 @@ static void qcow2_refresh_limits(BlockDriverState *bs, Error **errp) } bs->bl.pwrite_zeroes_alignment = s->cluster_size; bs->bl.pdiscard_alignment = s->cluster_size; + bs->bl.max_transfer = INT64_MAX; } static int qcow2_reopen_prepare(BDRVReopenState *state, -- 2.17.2