From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Rusty Russell <rusty@rustcorp.com.au>,
qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers are flushed
Date: Wed, 12 Dec 2012 14:50:50 +0100 [thread overview]
Message-ID: <20121212135050.GC16270@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20121212105101.GA6461@redhat.com>
On Wed, Dec 12, 2012 at 12:51:01PM +0200, Michael S. Tsirkin wrote:
> Add sanity check to address the following concern:
>
> During migration, all we pass the index of the request;
> the rest can be re-read from the ring.
>
> This is not generally enough if any available requests are outstanding.
> Imagine a ring of size 4. Below A means available U means used.
>
> A 1
> A 2
> U 2
> A 2
> U 2
> A 2
> U 2
> A 2
> U 2
>
> At this point available ring has wrapped around, the only
> way to know head 1 is outstanding is because backend
> has stored this info somewhere.
>
> The reason we manage to migrate without tracking this in migration
> state is because we flush outstanding requests before
> migration.
> This flush is device-specific though, let's add
> a safeguard in virtio core to ensure it's done properly.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> Changes from v1:
> v1 was against the wrong tree, it didn't build against qemu.git
>
> hw/virtio.c | 2 ++
> 1 file changed, 2 insertions(+)
VirtIOBlock->rq can trigger the assertion.
IIUC hw/virtio-blk.c may handle I/O errors by keeping the request
pending and on a list (->rq). This allows the user to restart them
after, for example, adding more space to the host file system containing
the disk image file.
We keep a list of failed requests and we migrate this list. So I think
inuse != 0 when migrating with pending failed I/O requests.
Stefan
next prev parent reply other threads:[~2012-12-12 13:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 10:51 [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers are flushed Michael S. Tsirkin
2012-12-12 13:50 ` Stefan Hajnoczi [this message]
2012-12-12 14:01 ` Paolo Bonzini
2012-12-12 14:30 ` Michael S. Tsirkin
2012-12-12 14:36 ` Paolo Bonzini
2012-12-12 14:47 ` Michael S. Tsirkin
2012-12-12 15:01 ` Paolo Bonzini
2012-12-12 15:25 ` Michael S. Tsirkin
2012-12-12 15:52 ` Paolo Bonzini
2012-12-12 16:37 ` Michael S. Tsirkin
2012-12-12 16:51 ` Paolo Bonzini
2012-12-12 17:14 ` Michael S. Tsirkin
2012-12-12 17:39 ` Paolo Bonzini
2012-12-12 19:23 ` Michael S. Tsirkin
2012-12-12 21:00 ` Paolo Bonzini
2012-12-12 21:19 ` Michael S. Tsirkin
2012-12-12 21:33 ` Anthony Liguori
2012-12-12 21:51 ` Michael S. Tsirkin
2012-12-14 1:06 ` Rusty Russell
2012-12-14 7:51 ` Paolo Bonzini
2012-12-16 20:36 ` Anthony Liguori
2012-12-13 7:39 ` Paolo Bonzini
2012-12-13 10:48 ` Kevin Wolf
2012-12-16 16:14 ` Michael S. Tsirkin
2012-12-12 14:26 ` Michael S. Tsirkin
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=20121212135050.GC16270@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--cc=stefanha@redhat.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).