From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCSsm-0003le-TI for qemu-devel@nongnu.org; Thu, 22 Aug 2013 07:16:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCSsg-00061b-SW for qemu-devel@nongnu.org; Thu, 22 Aug 2013 07:16:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCSsg-00061Q-Ic for qemu-devel@nongnu.org; Thu, 22 Aug 2013 07:16:46 -0400 Message-ID: <5215F2EF.4060106@redhat.com> Date: Thu, 22 Aug 2013 13:15:59 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1377050567-19122-1-git-send-email-asias@redhat.com> <20130821152440.GB18303@stefanha-thinkpad.redhat.com> <5214DF5B.50203@redhat.com> <20130822055947.GB24870@in.ibm.com> <20130822074846.GC10412@stefanha-thinkpad.redhat.com> <5215D4A7.60501@redhat.com> <20130822095542.GA2755@in.ibm.com> <5215E150.7000800@redhat.com> <20130822102829.GB2755@in.ibm.com> In-Reply-To: <20130822102829.GB2755@in.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bharata@linux.vnet.ibm.com Cc: Kevin Wolf , Vijay Bellur , Stefan Hajnoczi , qemu-devel@nongnu.org, Stefan Hajnoczi , Asias He , MORITA Kazutaka 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. Paolo