* [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function
@ 2014-03-04 15:35 Jeff Cody
2014-03-04 15:55 ` Eric Blake
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jeff Cody @ 2014-03-04 15:35 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, stefanha
Originally, this built up the error message with the backing filename,
so that errp was set as follows:
error_set(errp, QERR_OPEN_FILE_FAILED, backing_filename);
However, we now propagate the local_error from the
bdrv_open_backing_file() call instead, making these 2 lines useless
code.
Signed-off-by: Jeff Cody <jcody@redhat.com>
---
block/mirror.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index e683959..dd5ee05 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -520,9 +520,6 @@ static void mirror_complete(BlockJob *job, Error **errp)
ret = bdrv_open_backing_file(s->target, NULL, &local_err);
if (ret < 0) {
- char backing_filename[PATH_MAX];
- bdrv_get_full_backing_filename(s->target, backing_filename,
- sizeof(backing_filename));
error_propagate(errp, local_err);
return;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function
2014-03-04 15:35 [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function Jeff Cody
@ 2014-03-04 15:55 ` Eric Blake
2014-03-04 16:45 ` Benoît Canet
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Eric Blake @ 2014-03-04 15:55 UTC (permalink / raw)
To: Jeff Cody, qemu-devel; +Cc: kwolf, stefanha
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
On 03/04/2014 08:35 AM, Jeff Cody wrote:
> Originally, this built up the error message with the backing filename,
> so that errp was set as follows:
> error_set(errp, QERR_OPEN_FILE_FAILED, backing_filename);
>
> However, we now propagate the local_error from the
> bdrv_open_backing_file() call instead, making these 2 lines useless
> code.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
> block/mirror.c | 3 ---
> 1 file changed, 3 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
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: 604 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function
2014-03-04 15:35 [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function Jeff Cody
2014-03-04 15:55 ` Eric Blake
@ 2014-03-04 16:45 ` Benoît Canet
2014-03-06 10:44 ` Stefan Hajnoczi
2014-03-06 10:48 ` Kevin Wolf
3 siblings, 0 replies; 5+ messages in thread
From: Benoît Canet @ 2014-03-04 16:45 UTC (permalink / raw)
To: Jeff Cody; +Cc: kwolf, qemu-devel, stefanha
The Tuesday 04 Mar 2014 à 10:35:48 (-0500), Jeff Cody wrote :
> Originally, this built up the error message with the backing filename,
> so that errp was set as follows:
> error_set(errp, QERR_OPEN_FILE_FAILED, backing_filename);
>
> However, we now propagate the local_error from the
> bdrv_open_backing_file() call instead, making these 2 lines useless
> code.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
> block/mirror.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/block/mirror.c b/block/mirror.c
> index e683959..dd5ee05 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -520,9 +520,6 @@ static void mirror_complete(BlockJob *job, Error **errp)
>
> ret = bdrv_open_backing_file(s->target, NULL, &local_err);
> if (ret < 0) {
> - char backing_filename[PATH_MAX];
> - bdrv_get_full_backing_filename(s->target, backing_filename,
> - sizeof(backing_filename));
> error_propagate(errp, local_err);
> return;
> }
> --
> 1.8.3.1
>
>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function
2014-03-04 15:35 [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function Jeff Cody
2014-03-04 15:55 ` Eric Blake
2014-03-04 16:45 ` Benoît Canet
@ 2014-03-06 10:44 ` Stefan Hajnoczi
2014-03-06 10:48 ` Kevin Wolf
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2014-03-06 10:44 UTC (permalink / raw)
To: Jeff Cody; +Cc: kwolf, qemu-devel, stefanha
On Tue, Mar 04, 2014 at 10:35:48AM -0500, Jeff Cody wrote:
> Originally, this built up the error message with the backing filename,
> so that errp was set as follows:
> error_set(errp, QERR_OPEN_FILE_FAILED, backing_filename);
>
> However, we now propagate the local_error from the
> bdrv_open_backing_file() call instead, making these 2 lines useless
> code.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
> block/mirror.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/block/mirror.c b/block/mirror.c
> index e683959..dd5ee05 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -520,9 +520,6 @@ static void mirror_complete(BlockJob *job, Error **errp)
>
> ret = bdrv_open_backing_file(s->target, NULL, &local_err);
> if (ret < 0) {
> - char backing_filename[PATH_MAX];
> - bdrv_get_full_backing_filename(s->target, backing_filename,
> - sizeof(backing_filename));
> error_propagate(errp, local_err);
> return;
> }
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function
2014-03-04 15:35 [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function Jeff Cody
` (2 preceding siblings ...)
2014-03-06 10:44 ` Stefan Hajnoczi
@ 2014-03-06 10:48 ` Kevin Wolf
3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2014-03-06 10:48 UTC (permalink / raw)
To: Jeff Cody; +Cc: qemu-devel, stefanha
Am 04.03.2014 um 16:35 hat Jeff Cody geschrieben:
> Originally, this built up the error message with the backing filename,
> so that errp was set as follows:
> error_set(errp, QERR_OPEN_FILE_FAILED, backing_filename);
>
> However, we now propagate the local_error from the
> bdrv_open_backing_file() call instead, making these 2 lines useless
> code.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-06 10:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 15:35 [Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function Jeff Cody
2014-03-04 15:55 ` Eric Blake
2014-03-04 16:45 ` Benoît Canet
2014-03-06 10:44 ` Stefan Hajnoczi
2014-03-06 10:48 ` Kevin Wolf
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).