[Top][All Lists]

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

Re: [Qemu-devel] [PATCH V3 6/7] qcow2: print message for error path in s

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V3 6/7] qcow2: print message for error path in snapshot creation
Date: Mon, 30 Sep 2013 16:08:53 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

On 09/08/2013 08:58 PM, Wenchao Xia wrote:
> The message will be print out with a macro enabled, which can


> be used to check which error path is taken.
> Signed-off-by: Wenchao Xia <address@hidden>
> ---
>  block/qcow2-snapshot.c |   46 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 46 insertions(+), 0 deletions(-)

> @@ -381,12 +413,20 @@ int qcow2_snapshot_create(BlockDriverState *bs, 
> QEMUSnapshotInfo *sn_info)
>      ret = qcow2_pre_write_overlap_check(bs, QCOW2_OL_DEFAULT,
>              sn->l1_table_offset, s->l1_size * sizeof(uint64_t));
>      if (ret < 0) {
> +        printf("qcow2: Failed in overlap check before update L1 table for "
> +               "snapshot\n");
> +#endif
>          goto dealloc_cluster;
>      }

Should this BLKDBG be part of patch 5?

In general, the move to avoid fprintf except under recompilation seems
okay; but it seems odd to be removing the diagnosis altogether.  If you
had gone one step further and refactored the code to wire in Error*
support, then you could change fprintf to passing the Error back up the
stack to the caller rather than losing it except during a debug build.

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]