From: Luiz Capitulino <lcapitulino@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: stefanha@gmail.com, jan.kiszka@siemens.com, jdenemar@redhat.com,
qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/8] block: Support to keep track of I/O status
Date: Tue, 12 Jul 2011 11:56:05 -0300 [thread overview]
Message-ID: <20110712115605.7475b477@doriath> (raw)
In-Reply-To: <4E1C5952.1040901@redhat.com>
On Tue, 12 Jul 2011 16:25:22 +0200
Kevin Wolf <kwolf@redhat.com> wrote:
> Am 05.07.2011 20:17, schrieb Luiz Capitulino:
> > This commit adds support to the BlockDriverState type to keep track
> > of the last I/O status. That is, at every I/O operation we update
> > a status field in the BlockDriverState instance. Valid statuses are:
> > OK, FAILED and ENOSPC.
> >
> > ENOSPC is distinguished from FAILED because an management application
> > can use it to implement thin-provisioning.
> >
> > This feature has to be explicit enabled by buses/devices supporting it.
> >
> > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
>
> I'm not sure how this is meant to work with devices that can have
> multiple requests in flight. If a request fails, one of the things that
> are done before sending a monitor event is qemu_aio_flush(), i.e.
> waiting for all in-flight requests to complete. If the last one of them
> is successful, your status will report BDRV_IOS_OK.
We're more interested in states that the device can not recover from or
that are not temporary. So, if something really bad happens I'd expect
all in-flight requests to fail the same way. Am I wrong?
> If you don't stop the VM on I/O errors, the status is useless anyway,
> even if only one request is active at the same point.
Right, that's a good point. A mngt application can only trust that the
status won't change in the next second if the VM is stopped.
> I think it would make more sense if we only stored the last error (that
> is, don't clear the field on success). What is the use case, would this
> be enough for it?
Yes, it would, but there's a problem. If the management application manages
to correct the error and put the VM to run again, we need to clear the status,
otherwise the management application could get confused if the status is read
at a later time.
The most effective way I found to do this was to let the device report its
own current status. But I see two other ways of doing this:
1. We could only report the status if the VM is paused. This doesn't change
much the implementation though
2. We could allow the mngt app to clear the status
> By the way, I'm not sure how it fits in, but I'd like to have a block
> layer function that format drivers can use to tell qemu that the image
> is corrupted. Maybe that's another case in which we should stop the VM
> and have an appropriate status for it. It should probably have
> precedence over an ENOSPC happening at the same time, so maybe we'll
> also need a way to tell that some status is more important and may
> overwrite a less important status, but not the other way round.
Yes, seems to make sense.
next prev parent reply other threads:[~2011-07-12 14:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-05 18:17 [Qemu-devel] [PATCH v1 0/8]: QMP: Thin provisioning support Luiz Capitulino
2011-07-05 18:17 ` [Qemu-devel] [PATCH 1/8] Introduce the VMStatus type Luiz Capitulino
2011-07-05 18:33 ` Anthony Liguori
2011-07-05 18:51 ` Luiz Capitulino
2011-07-05 18:58 ` Anthony Liguori
2011-07-05 19:34 ` Luiz Capitulino
2011-07-12 7:28 ` Markus Armbruster
2011-07-12 14:25 ` Luiz Capitulino
2011-07-12 14:51 ` Kevin Wolf
2011-07-12 15:12 ` Luiz Capitulino
2011-07-12 16:03 ` Luiz Capitulino
2011-07-12 16:16 ` Kevin Wolf
2011-07-12 17:59 ` Luiz Capitulino
2011-07-05 18:17 ` [Qemu-devel] [PATCH 2/8] QMP: query-status: Introduce 'status' key Luiz Capitulino
2011-07-05 18:17 ` [Qemu-devel] [PATCH 3/8] block: Support to keep track of I/O status Luiz Capitulino
2011-07-12 7:45 ` Markus Armbruster
2011-07-12 8:33 ` Kevin Wolf
2011-07-12 9:12 ` Markus Armbruster
2011-07-12 14:38 ` Luiz Capitulino
2011-07-12 14:25 ` Kevin Wolf
2011-07-12 14:56 ` Luiz Capitulino [this message]
2011-07-05 18:17 ` [Qemu-devel] [PATCH 4/8] ide: Support " Luiz Capitulino
2011-07-05 18:17 ` [Qemu-devel] [PATCH 5/8] virtio: " Luiz Capitulino
2011-07-05 18:17 ` [Qemu-devel] [PATCH 6/8] scsi: " Luiz Capitulino
2011-07-05 18:17 ` [Qemu-devel] [PATCH 7/8] QMP: query-status: Add 'io-status' key Luiz Capitulino
2011-07-12 7:47 ` Markus Armbruster
2011-07-12 14:56 ` Luiz Capitulino
2011-07-05 18:17 ` [Qemu-devel] [PATCH 8/8] HMP: Print 'io-status' information Luiz Capitulino
2011-07-11 17:43 ` [Qemu-devel] [PATCH v1 0/8]: QMP: Thin provisioning support Luiz Capitulino
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=20110712115605.7475b477@doriath \
--to=lcapitulino@redhat.com \
--cc=armbru@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jdenemar@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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 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).