qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] query-block io-status display
@ 2017-09-05  4:59 Jack Schwartz
  2017-09-06  9:08 ` Kevin Wolf
  0 siblings, 1 reply; 2+ messages in thread
From: Jack Schwartz @ 2017-09-05  4:59 UTC (permalink / raw)
  To: lcapitulino, armbru; +Cc: qemu-devel

Hi Luiz, Markus and everyone.

I am working on a qemu enhancement to display io-status in each 
query-block command, not just those for devices which have werror and/or 
rerror set to stop on error.

I'd like to verify the reasons behind the query-block command not 
reporting io-status if errors were reported to the guest or ignored.  A 
clue may come from the original code review email[1] for when this code 
was implemented:

   "In case of multiple errors being triggered in sequence only the first
    one is stored. The I/O status is always reset to BDRV_IOS_OK when the
    'cont' command is issued."

 From this I infer:
- io-status is shown when qemu is stopped onerror so errors can be seen 
in cases where a guest does not handle them.
- io-status is not shown when errors are already being handled by a guest
- io-status is not shown when errors are ignored

Is this correct?  Are there other subtleties/reasons as well?

     Thanks,
     Jack

[1] http://lists.nongnu.org/archive/html/qemu-devel/2011-09/msg02940.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] query-block io-status display
  2017-09-05  4:59 [Qemu-devel] query-block io-status display Jack Schwartz
@ 2017-09-06  9:08 ` Kevin Wolf
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2017-09-06  9:08 UTC (permalink / raw)
  To: Jack Schwartz; +Cc: lcapitulino, armbru, qemu-devel, qemu-block

[ Cc: qemu-block ]

Am 05.09.2017 um 06:59 hat Jack Schwartz geschrieben:
> Hi Luiz, Markus and everyone.
> 
> I am working on a qemu enhancement to display io-status in each query-block
> command, not just those for devices which have werror and/or rerror set to
> stop on error.
> 
> I'd like to verify the reasons behind the query-block command not reporting
> io-status if errors were reported to the guest or ignored.  A clue may come
> from the original code review email[1] for when this code was implemented:
> 
>   "In case of multiple errors being triggered in sequence only the first
>    one is stored. The I/O status is always reset to BDRV_IOS_OK when the
>    'cont' command is issued."
> 
> From this I infer:
> - io-status is shown when qemu is stopped onerror so errors can be seen in
> cases where a guest does not handle them.
> - io-status is not shown when errors are already being handled by a guest
> - io-status is not shown when errors are ignored
> 
> Is this correct?  Are there other subtleties/reasons as well?

I think that covers it more or less, except maybe for one missing piece
of information: io-status reports the error while the guest is stopped
for an I/O error. It is reset (i.e. returns 'ok' again) as soon as the
VM is continued, so that you don't see an old error later while the VM
is running just fine at that moment.

This is also why there is no io-status when errors are ignored or
reported to the guest: The VM is immediately resumed (or actually not
even stopped), so it would either always return 'ok' or you wouldn't
know whether the error is old or new.

Kevin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-06  9:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-05  4:59 [Qemu-devel] query-block io-status display Jack Schwartz
2017-09-06  9:08 ` 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).