[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 3/6] qcow2: Reduce REFT_OFFSET_MASK
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH v6 3/6] qcow2: Reduce REFT_OFFSET_MASK |
Date: |
Wed, 25 Apr 2018 21:51:26 -0500 |
Match our code to the spec change in the previous patch - there's
no reason for the refcount table to allow larger offsets than the
L1/L2 tables. In practice, no image has more than 64PB of
allocated clusters anyways, as anything beyond that can't be
expressed via L2 mappings to host offsets.
Suggested-by: Alberto Garcia <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
---
v4: new patch
---
block/qcow2.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/qcow2.h b/block/qcow2.h
index adf5c3950fd..1df15a18aa1 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -443,7 +443,7 @@ typedef enum QCow2MetadataOverlap {
#define L2E_OFFSET_MASK 0x00fffffffffffe00ULL
#define L2E_COMPRESSED_OFFSET_SIZE_MASK 0x3fffffffffffffffULL
-#define REFT_OFFSET_MASK 0xfffffffffffffe00ULL
+#define REFT_OFFSET_MASK 0x00fffffffffffe00ULL
static inline int64_t start_of_cluster(BDRVQcow2State *s, int64_t offset)
{
--
2.14.3
- [Qemu-devel] [PATCH v6 0/6] minor qcow2 compression improvements, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH v6 4/6] qcow2: Don't allow overflow during cluster allocation, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH v6 6/6] qcow2: Avoid memory over-allocation on compressed images, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH v6 3/6] qcow2: Reduce REFT_OFFSET_MASK,
Eric Blake <=
- [Qemu-devel] [PATCH v6 5/6] iotests: Add new test 214 for max compressed cluster offset, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH v6 1/6] qcow2: Prefer byte-based calls into bs->file, Eric Blake, 2018/04/25
- [Qemu-devel] [PATCH v6 2/6] qcow2: Document some maximum size constraints, Eric Blake, 2018/04/25