qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/5] qcow2: Add qcow2_signal_corruption()


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 2/5] qcow2: Add qcow2_signal_corruption()
Date: Fri, 05 Sep 2014 08:43:00 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

On 09/05/2014 08:07 AM, Max Reitz wrote:
> Add a helper function for easily marking an image corrupt (on fatal
> corruptions) while outputting an informative message to stderr and via
> QAPI.
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  block/qcow2.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
>  block/qcow2.h |  5 +++++
>  2 files changed, 53 insertions(+)
> 

> +void qcow2_signal_corruption(BlockDriverState *bs, bool fatal, int64_t 
> offset,
> +                             int64_t size, const char *message_format, ...)
> +{
> +    BDRVQcowState *s = bs->opaque;
> +    char *message;
> +    va_list ap;
> +
> +    fatal = fatal && !bs->read_only;

I probably would have written: fatal &= !bs->read_only
but that's cosmetic.

Reviewed-by: Eric Blake <address@hidden>

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]