* [Qemu-devel] [PATCH] qemu-img: Improve commit invalid base message
@ 2016-12-01 2:05 Max Reitz
2016-12-01 2:36 ` Eric Blake
2017-01-16 17:16 ` Max Reitz
0 siblings, 2 replies; 4+ messages in thread
From: Max Reitz @ 2016-12-01 2:05 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf
When trying to invoke qemu-img commit with a base image file name that
is not part of the top image's backing chain, the user receives a rather
plain "Base not found" error message. This is not really helpful because
it does not explain what "not found" means, potentially leaving the user
wondering why qemu cannot find a file despite it clearly existing in the
file system.
Improve the error message by clarifying that "not found" means "not
found in the top image's backing chain".
Reported-by: Ala Hino <ahino@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
Reported in: https://bugzilla.redhat.com/show_bug.cgi?id=1390991
---
qemu-img.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index 6949b73..d020e9a 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -912,7 +912,9 @@ static int img_commit(int argc, char **argv)
if (base) {
base_bs = bdrv_find_backing_image(bs, base);
if (!base_bs) {
- error_setg(&local_err, QERR_BASE_NOT_FOUND, base);
+ error_setg(&local_err,
+ "Did not find '%s' in the backing chain of '%s'",
+ base, filename);
goto done;
}
} else {
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-img: Improve commit invalid base message
2016-12-01 2:05 [Qemu-devel] [PATCH] qemu-img: Improve commit invalid base message Max Reitz
@ 2016-12-01 2:36 ` Eric Blake
2016-12-01 23:38 ` Max Reitz
2017-01-16 17:16 ` Max Reitz
1 sibling, 1 reply; 4+ messages in thread
From: Eric Blake @ 2016-12-01 2:36 UTC (permalink / raw)
To: Max Reitz, qemu-block; +Cc: Kevin Wolf, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]
On 11/30/2016 08:05 PM, Max Reitz wrote:
> When trying to invoke qemu-img commit with a base image file name that
> is not part of the top image's backing chain, the user receives a rather
> plain "Base not found" error message. This is not really helpful because
> it does not explain what "not found" means, potentially leaving the user
> wondering why qemu cannot find a file despite it clearly existing in the
> file system.
>
> Improve the error message by clarifying that "not found" means "not
> found in the top image's backing chain".
>
> Reported-by: Ala Hino <ahino@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> Reported in: https://bugzilla.redhat.com/show_bug.cgi?id=1390991
> ---
> qemu-img.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Safe for 2.8, if the block maintainers agree.
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] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-img: Improve commit invalid base message
2016-12-01 2:36 ` Eric Blake
@ 2016-12-01 23:38 ` Max Reitz
0 siblings, 0 replies; 4+ messages in thread
From: Max Reitz @ 2016-12-01 23:38 UTC (permalink / raw)
To: Eric Blake, qemu-block; +Cc: Kevin Wolf, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]
On 01.12.2016 03:36, Eric Blake wrote:
> On 11/30/2016 08:05 PM, Max Reitz wrote:
>> When trying to invoke qemu-img commit with a base image file name that
>> is not part of the top image's backing chain, the user receives a rather
>> plain "Base not found" error message. This is not really helpful because
>> it does not explain what "not found" means, potentially leaving the user
>> wondering why qemu cannot find a file despite it clearly existing in the
>> file system.
>>
>> Improve the error message by clarifying that "not found" means "not
>> found in the top image's backing chain".
>>
>> Reported-by: Ala Hino <ahino@redhat.com>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>> Reported in: https://bugzilla.redhat.com/show_bug.cgi?id=1390991
>> ---
>> qemu-img.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> Safe for 2.8, if the block maintainers agree.
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
Thanks!
I agree that it's safe, but we're at a point where only critical things
should go into the release. Getting this into 2.9 will be sufficient.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-img: Improve commit invalid base message
2016-12-01 2:05 [Qemu-devel] [PATCH] qemu-img: Improve commit invalid base message Max Reitz
2016-12-01 2:36 ` Eric Blake
@ 2017-01-16 17:16 ` Max Reitz
1 sibling, 0 replies; 4+ messages in thread
From: Max Reitz @ 2017-01-16 17:16 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Kevin Wolf
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
On 01.12.2016 03:05, Max Reitz wrote:
> When trying to invoke qemu-img commit with a base image file name that
> is not part of the top image's backing chain, the user receives a rather
> plain "Base not found" error message. This is not really helpful because
> it does not explain what "not found" means, potentially leaving the user
> wondering why qemu cannot find a file despite it clearly existing in the
> file system.
>
> Improve the error message by clarifying that "not found" means "not
> found in the top image's backing chain".
>
> Reported-by: Ala Hino <ahino@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> Reported in: https://bugzilla.redhat.com/show_bug.cgi?id=1390991
> ---
> qemu-img.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Applied to my block tree.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-16 17:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-01 2:05 [Qemu-devel] [PATCH] qemu-img: Improve commit invalid base message Max Reitz
2016-12-01 2:36 ` Eric Blake
2016-12-01 23:38 ` Max Reitz
2017-01-16 17:16 ` Max Reitz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.