From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 5/6] qcow2: Add more overlap check bitmask macros
Date: Wed, 9 Oct 2013 15:07:53 +0200 [thread overview]
Message-ID: <20131009130753.GN8994@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <1379666231-10443-6-git-send-email-mreitz@redhat.com>
Am 20.09.2013 um 10:37 hat Max Reitz geschrieben:
> Introduces the macros QCOW2_OL_CONSTANT and QCOW2_OL_ALL in addition to
> the already existing QCOW2_OL_CACHED, signifying all metadata overlap
> checks that can be performed in constant time (regardless of image size
> etc.) and truly all available overlap checks, respectively.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> block/qcow2.h | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/block/qcow2.h b/block/qcow2.h
> index 067ed2f..098c14f 100644
> --- a/block/qcow2.h
> +++ b/block/qcow2.h
> @@ -326,11 +326,19 @@ typedef enum QCow2MetadataOverlap {
> QCOW2_OL_INACTIVE_L2 = (1 << QCOW2_OL_INACTIVE_L2_BITNR),
> } QCow2MetadataOverlap;
>
> +/* Perform all overlap checks which can be done in constant time */
> +#define QCOW2_OL_CONSTANT \
> + (QCOW2_OL_MAIN_HEADER | QCOW2_OL_ACTIVE_L1 | QCOW2_OL_REFCOUNT_TABLE | \
> + QCOW2_OL_SNAPSHOT_TABLE)
> +
> /* Perform all overlap checks which don't require disk access */
> #define QCOW2_OL_CACHED \
> - (QCOW2_OL_MAIN_HEADER | QCOW2_OL_ACTIVE_L1 | QCOW2_OL_ACTIVE_L2 | \
> - QCOW2_OL_REFCOUNT_TABLE | QCOW2_OL_REFCOUNT_BLOCK | \
> - QCOW2_OL_SNAPSHOT_TABLE | QCOW2_OL_INACTIVE_L1)
> + (QCOW2_OL_CONSTANT | QCOW2_OL_ACTIVE_L2 | QCOW2_OL_REFCOUNT_BLOCK | \
> + QCOW2_OL_SNAPSHOT_TABLE)
QCOW2_OL_INACTIVE_L1 is lost here.
> +/* Perform all overlap checks */
> +#define QCOW2_OL_ALL \
> + (QCOW2_OL_CACHED | QCOW2_OL_INACTIVE_L2)
Kevin
next prev parent reply other threads:[~2013-10-09 13:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 8:37 [Qemu-devel] [PATCH 0/6] Configure metadata overlap checks at runtime Max Reitz
2013-09-20 8:37 ` [Qemu-devel] [PATCH 1/6] qcow2: Use negated overflow check mask Max Reitz
2013-09-20 8:37 ` [Qemu-devel] [PATCH 2/6] qcow2: Make overlap check mask variable Max Reitz
2013-09-20 8:37 ` [Qemu-devel] [PATCH 3/6] qcow2: Add overlap-check options Max Reitz
2013-09-20 8:37 ` [Qemu-devel] [PATCH 4/6] qcow2: Array assigning options to OL check bits Max Reitz
2013-09-20 8:37 ` [Qemu-devel] [PATCH 5/6] qcow2: Add more overlap check bitmask macros Max Reitz
2013-10-09 13:07 ` Kevin Wolf [this message]
2013-10-09 13:22 ` Max Reitz
2013-09-20 8:37 ` [Qemu-devel] [PATCH 6/6] qcow2: Evaluate overlap check options Max Reitz
2013-10-09 10:17 ` [Qemu-devel] [PATCH 0/6] Configure metadata overlap checks at runtime Max Reitz
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=20131009130753.GN8994@dhcp-200-207.str.redhat.com \
--to=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).