From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, qemu-block@nongnu.org, berto@igalia.com,
Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH v5 3/5] qcow2: Reduce REFT_OFFSET_MASK
Date: Mon, 23 Apr 2018 17:33:35 -0500 [thread overview]
Message-ID: <20180423223337.82366-4-eblake@redhat.com> (raw)
In-Reply-To: <20180423223337.82366-1-eblake@redhat.com>
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 <berto@igalia.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
---
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
next prev parent reply other threads:[~2018-04-23 22:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 22:33 [Qemu-devel] [PATCH v5 0/5] minor qcow2 compression improvements Eric Blake
2018-04-23 22:33 ` [Qemu-devel] [PATCH v5 1/5] qcow2: Prefer byte-based calls into bs->file Eric Blake
2018-04-23 22:33 ` [Qemu-devel] [PATCH v5 2/5] qcow2: Document some maximum size constraints Eric Blake
2018-04-24 9:13 ` Alberto Garcia
2018-04-23 22:33 ` Eric Blake [this message]
2018-04-23 22:33 ` [Qemu-devel] [PATCH v5 4/5] qcow2: Don't allow overflow during cluster allocation Eric Blake
2018-04-25 14:44 ` Max Reitz
2018-04-25 18:26 ` Eric Blake
2018-04-25 20:31 ` Eric Blake
2018-04-23 22:33 ` [Qemu-devel] [PATCH v5 5/5] qcow2: Avoid memory over-allocation on compressed images Eric Blake
2018-04-25 15:00 ` Max Reitz
2018-04-25 18:37 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180423223337.82366-4-eblake@redhat.com \
--to=eblake@redhat.com \
--cc=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).