qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 2/8] qcow2: Metadata overlap checks
Date: Fri, 30 Aug 2013 08:22:10 -0600	[thread overview]
Message-ID: <5220AA92.3060301@redhat.com> (raw)
In-Reply-To: <1377866071-27611-3-git-send-email-mreitz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1994 bytes --]

On 08/30/2013 06:34 AM, Max Reitz wrote:
> Two new functions are added; the first one checks a given range in the
> image file for overlaps with metadata (main header, L1 tables, L2
> tables, refcount table and blocks).
> 
> The second one should be used immediately before writing to the image
> file as it calls the first function and, upon collision, marks the
> image as corrupt and makes the BDS unusable, thereby preventing
> further access.
> 
> Both functions take a bitmask argument specifying the structures which
> should be checked for overlaps, making it possible to also check
> metadata writes against colliding with other structures.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  block/qcow2-refcount.c    | 172 ++++++++++++++++++++++++++++++++++++++++++++++
>  block/qcow2.h             |  39 +++++++++++
>  include/monitor/monitor.h |   1 +
>  monitor.c                 |   1 +
>  4 files changed, 213 insertions(+)

I know this is already in the QMP queue, but...

> +++ b/include/monitor/monitor.h
> @@ -48,6 +48,7 @@ typedef enum MonitorEvent {
>      QEVENT_BALLOON_CHANGE,
>      QEVENT_SPICE_MIGRATE_COMPLETED,
>      QEVENT_GUEST_PANICKED,
> +    QEVENT_BLOCK_IMAGE_CORRUPTED,
>  
>      /* Add to 'monitor_event_names' array in monitor.c when
>       * defining new events here */
> diff --git a/monitor.c b/monitor.c
> index ee9744c..2c542e1 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -504,6 +504,7 @@ static const char *monitor_event_names[] = {
>      [QEVENT_BALLOON_CHANGE] = "BALLOON_CHANGE",
>      [QEVENT_SPICE_MIGRATE_COMPLETED] = "SPICE_MIGRATE_COMPLETED",
>      [QEVENT_GUEST_PANICKED] = "GUEST_PANICKED",
> +    [QEVENT_BLOCK_IMAGE_CORRUPTED] = "BLOCK_IMAGE_CORRUPTED",
>  };

You are missing documentation for this new event.  Please provide a
followup patch to qmp-events.txt.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-08-30 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 12:34 [Qemu-devel] [PATCH v4 0/8] Add metadata overlap checks Max Reitz
2013-08-30 12:34 ` [Qemu-devel] [PATCH v4 1/8] qcow2: Add corrupt bit Max Reitz
2013-08-30 12:34 ` [Qemu-devel] [PATCH v4 2/8] qcow2: Metadata overlap checks Max Reitz
2013-08-30 14:22   ` Eric Blake [this message]
2013-08-30 12:34 ` [Qemu-devel] [PATCH v4 3/8] qcow2: Employ metadata " Max Reitz
2013-08-30 12:34 ` [Qemu-devel] [PATCH v4 4/8] qcow2-refcount: Move OFLAG_COPIED checks Max Reitz
2013-08-30 12:34 ` [Qemu-devel] [PATCH v4 5/8] qcow2-refcount: Repair OFLAG_COPIED errors Max Reitz
2013-08-30 12:34 ` [Qemu-devel] [PATCH v4 6/8] qcow2-refcount: Repair shared refcount blocks Max Reitz
2013-08-30 12:34 ` [Qemu-devel] [PATCH v4 7/8] qcow2_check: Mark image consistent Max Reitz
2013-08-30 12:34 ` [Qemu-devel] [PATCH v4 8/8] qemu-iotests: Overlapping cluster allocations Max Reitz
2013-08-30 14:14 ` [Qemu-devel] [PATCH v4 0/8] Add metadata overlap checks Kevin Wolf

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=5220AA92.3060301@redhat.com \
    --to=eblake@redhat.com \
    --cc=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).