All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-error: Introduce get_errno_name()
Date: Tue, 04 May 2010 16:56:19 -0500	[thread overview]
Message-ID: <4BE09803.5040703@codemonkey.ws> (raw)
In-Reply-To: <20100504173014.30f71418@redhat.com>

On 05/04/2010 03:30 PM, Luiz Capitulino wrote:
>
>   StateVmSaveFailed is not like CommandFailed, there are five errors
> in do_savevm() and StateVmSaveFailed happens to be one of them.
>
>   But I understand what you mean and I have considered doing something
> like it, one of the problems though is that I'm not sure 'source' is
> enough to determine where the error has happened.
>
>   Consider do_savevm() again. We have three 'operations' that might
> fail: delete an existing snapshot, save the VM state and create the
> snapshot. All those operations can return -EIO as an error.
>    

Maybe those three operations should return distinct errnos?

That way, we can make more useful QErrors.

>   So, the first question is: would you map EIO to an QError? Just like
> you did for SocketIOError? If so, how would you know which operation
> has failed? Would you put its name in source? Or have an additional
> 'operation' key?
>
>   A related problem is not to degrade the current set of error messages
> we offer to the users. For do_savevm()'s 'save state' operation, current
> message is:
>
>     "Error -7 while writing VM"
>
>   With StateVmSaveFailed it becomes:
>
>     "Failed to save VM state ("EIO")"
>    

I don't think this is that useful to preserve because as you said, it 
could be one of three things.

Regards,

Anthony Liguori

>   Given the current implementation of QError, I'm not sure how we can have
> such a good error message if our QErrors are not 'operation based'.
>    

  reply	other threads:[~2010-05-04 21:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28 20:32 [Qemu-devel] [PATCH 0/2]: QMP: expose errno in the BLOCK_IO_ERROR event Luiz Capitulino
2010-04-28 20:32 ` [Qemu-devel] [PATCH 1/2] qemu-error: Introduce get_errno_name() Luiz Capitulino
2010-05-03 13:06   ` Markus Armbruster
2010-05-03 13:16     ` Anthony Liguori
2010-05-04 13:56       ` Luiz Capitulino
2010-05-04 14:03         ` Anthony Liguori
2010-05-04 20:30           ` Luiz Capitulino
2010-05-04 21:56             ` Anthony Liguori [this message]
2010-05-05 15:00               ` Luiz Capitulino
2010-05-10 17:45                 ` Markus Armbruster
2010-05-10 17:36       ` Markus Armbruster
2010-04-28 20:32 ` [Qemu-devel] [PATCH 2/2] QMP: Add 'reason' member to the BLOCK_IO_ERROR event Luiz Capitulino
2010-04-28 23:24   ` Anthony Liguori
2010-04-29 17:30     ` Luiz Capitulino
2010-05-03 13:14       ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BE09803.5040703@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.