[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 11/13] qcow2: Audit for read/write 64-bit cleanne
From: |
Eric Blake |
Subject: |
[Qemu-block] [PATCH v2 11/13] qcow2: Audit for read/write 64-bit cleanness |
Date: |
Wed, 14 Nov 2018 20:03:32 -0600 |
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 <address@hidden>
---
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
- [Qemu-block] [PATCH v2 03/13] vvfat: Switch to byte-based calls, (continued)
[Qemu-block] [PATCH v2 06/13] blkdebug: Audit for read/write 64-bit cleanness, Eric Blake, 2018/11/14
[Qemu-block] [PATCH v2 07/13] blklogwrites: Audit for read/write 64-bit cleanness, Eric Blake, 2018/11/14
[Qemu-block] [PATCH v2 11/13] qcow2: Audit for read/write 64-bit cleanness,
Eric Blake <=
[Qemu-block] [PATCH v2 08/13] crypto: Audit for read/write 64-bit cleanness, Eric Blake, 2018/11/14
[Qemu-block] [PATCH v2 09/13] RFC: crypto: Rely on block layer for fragmentation, Eric Blake, 2018/11/14
[Qemu-block] [PATCH v2 10/13] file-posix: Audit for read/write 64-bit cleanness, Eric Blake, 2018/11/14
[Qemu-block] [PATCH v2 12/13] block: Document need for audit of read/write 64-bit cleanness, Eric Blake, 2018/11/14
[Qemu-block] [PATCH v2 13/13] block: Enforce non-zero bl.max_transfer, Eric Blake, 2018/11/14
Re: [Qemu-block] [Qemu-devel] [PATCH v2 for-4.0 00/13] block: byte-based blocking read/write, no-reply, 2018/11/15