From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Vijay Bellur <vbellur@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
Asias He <asias@redhat.com>,
MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Subject: Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb
Date: Thu, 22 Aug 2013 18:55:51 +0530 [thread overview]
Message-ID: <20130822132551.GC2755@in.ibm.com> (raw)
In-Reply-To: <5215F2EF.4060106@redhat.com>
On Thu, Aug 22, 2013 at 01:15:59PM +0200, Paolo Bonzini wrote:
> Il 22/08/2013 12:28, Bharata B Rao ha scritto:
> > On Thu, Aug 22, 2013 at 12:00:48PM +0200, Paolo Bonzini wrote:
> >> Il 22/08/2013 11:55, Bharata B Rao ha scritto:
> >>> This was the first apporach I had. I used to abort when writes to pipe
> >>> fail. But there were concerns raised about handling the failures gracefully
> >>> and hence we ended up doing all that error handling of completing the aio
> >>> with -EIO, closing the pipe and making the disk inaccessible.
> >>>
> >>>>> Under what circumstances could it happen?
> >>> Not very sure, I haven't seen that happening. I had to manually inject
> >>> faults to test this error path and verify the graceful recovery.
> >>
> >> Looking at write(2), it looks like it is impossible
> >>
> >> EAGAIN or EWOULDBLOCK
> >> can't happen, blocking file descriptor
> >>
> >> EBADF, EPIPE
> >> shouldn't happen since the device is drained before
> >> calling qemu_gluster_close.
> >>
> >> EDESTADDRREQ, EDQUOT, EFBIG, EIO, ENOSPC
> >> cannot happen for pipes
> >>
> >> EFAULT
> >> abort would be fine
> >
> > In the case where we have separate system and data disks and if error (EFAULT)
> > happens for the data disk, don't we want to keep the VM up by gracefully
> > disabling IO to the data disk ?
>
> EFAULT means the buffer address is invalid, I/O error would be EIO, but...
>
> > I remember this was one of the motivations to
> > handle this failure.
>
> ... this write is on the pipe, not on a disk.
Right. Failure to complete the write on the pipe means that IO done to the
disk didn't complete and hence to the VM it is essentially a disk IO failure.
That's the reason we return -EIO and make the disk inaccessible when this
failure happens.
My question was if it is ok to abort the VM when IO to one of the disks fails ?
But, if you think it is not worth handling such errors then may be we can drop
this elaborate and race-prone error recovery and just abort.
Regards,
Bharata.
next prev parent reply other threads:[~2013-08-22 13:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 2:02 [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb Asias He
2013-08-21 8:16 ` Paolo Bonzini
2013-08-22 9:50 ` Asias He
2013-08-22 9:51 ` Paolo Bonzini
2013-08-23 8:32 ` Asias He
2013-08-23 9:05 ` Paolo Bonzini
2013-08-21 15:24 ` Stefan Hajnoczi
2013-08-21 15:40 ` Paolo Bonzini
2013-08-22 5:59 ` Bharata B Rao
2013-08-22 7:48 ` Stefan Hajnoczi
2013-08-22 9:06 ` Paolo Bonzini
2013-08-22 9:55 ` Bharata B Rao
2013-08-22 10:00 ` Paolo Bonzini
2013-08-22 10:28 ` Bharata B Rao
2013-08-22 11:15 ` Paolo Bonzini
2013-08-22 13:25 ` Bharata B Rao [this message]
2013-08-22 13:27 ` Paolo Bonzini
2013-08-22 14:01 ` Bharata B Rao
2013-08-22 14:52 ` Paolo Bonzini
2013-08-23 6:48 ` Bharata B Rao
2013-08-23 7:33 ` Paolo Bonzini
2013-08-23 8:11 ` Bharata B Rao
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=20130822132551.GC2755@in.ibm.com \
--to=bharata@linux.vnet.ibm.com \
--cc=asias@redhat.com \
--cc=kwolf@redhat.com \
--cc=morita.kazutaka@lab.ntt.co.jp \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.com \
--cc=vbellur@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).