[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/11] block: update error reporting for bdrv_sn
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 08/11] block: update error reporting for bdrv_snapshot_create() and related functions |
Date: |
Tue, 16 Apr 2013 17:54:02 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/16/2013 10:05 AM, Pavel Hrdina wrote:
> Signed-off-by: Pavel Hrdina <address@hidden>
> ---
> block.c | 23 ++++++++++++++---------
> block/qcow2-snapshot.c | 18 ++++++++++++------
> block/qcow2.h | 4 +++-
> block/rbd.c | 20 +++++++++++---------
> block/sheepdog.c | 22 +++++++++++-----------
> include/block/block.h | 5 +++--
> include/block/block_int.h | 5 +++--
> qemu-img.c | 8 +++-----
> savevm.c | 9 +++++----
> 9 files changed, 65 insertions(+), 49 deletions(-)
>
> @@ -855,20 +857,20 @@ static int qemu_rbd_snap_create(BlockDriverState *bs,
> */
> if (sn_info->id_str[0] != '\0' &&
> strcmp(sn_info->id_str, sn_info->name) != 0) {
> - return -EINVAL;
> + error_setg(errp, "rbd: ID and name have to be equal");
> + return;
Who generates sn_info->id_str in the first place? Didn't you just say
that the QMP interface does NOT expose user control over id_str, and
that it gets populated as a side effect of creation? That says that
this error condition is probably dead code, if the QMP command never
attempts to generate id_str itself.
At any rate, the conversion to errp looks reasonable.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 04/11] qapi: Convert delvm, (continued)
- [Qemu-devel] [PATCH 02/11] block: update error reporting for bdrv_snapshot_delete() and related functions, Pavel Hrdina, 2013/04/16
- [Qemu-devel] [PATCH 07/11] qapi: Convert loadvm, Pavel Hrdina, 2013/04/16
- [Qemu-devel] [PATCH 05/11] block: update error reporting for bdrv_snapshot_goto() and related functions, Pavel Hrdina, 2013/04/16
- [Qemu-devel] [PATCH 06/11] savevm: update error reporting for qemu_loadvm_state(), Pavel Hrdina, 2013/04/16
- [Qemu-devel] [PATCH 08/11] block: update error reporting for bdrv_snapshot_create() and related functions, Pavel Hrdina, 2013/04/16
- Re: [Qemu-devel] [PATCH 08/11] block: update error reporting for bdrv_snapshot_create() and related functions,
Eric Blake <=
- [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Pavel Hrdina, 2013/04/16
- Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Wenchao Xia, 2013/04/16
- Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Pavel Hrdina, 2013/04/17
- Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Wenchao Xia, 2013/04/17
- Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Pavel Hrdina, 2013/04/17
- Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Eric Blake, 2013/04/17
- Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Eric Blake, 2013/04/17
- Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Wenchao Xia, 2013/04/18
- Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Wenchao Xia, 2013/04/18
- Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find(), Pavel Hrdina, 2013/04/18