From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCS87-0002st-BR for qemu-devel@nongnu.org; Thu, 22 Aug 2013 06:28:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCS7y-0005HU-9V for qemu-devel@nongnu.org; Thu, 22 Aug 2013 06:28:39 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:54759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCS7x-000570-JQ for qemu-devel@nongnu.org; Thu, 22 Aug 2013 06:28:30 -0400 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Aug 2013 20:14:54 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 49B242CE8051 for ; Thu, 22 Aug 2013 20:28:22 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7MAS6Nv3408132 for ; Thu, 22 Aug 2013 20:28:11 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7MASGax007055 for ; Thu, 22 Aug 2013 20:28:17 +1000 Date: Thu, 22 Aug 2013 15:58:29 +0530 From: Bharata B Rao Message-ID: <20130822102829.GB2755@in.ibm.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5215E150.7000800@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Vijay Bellur , Stefan Hajnoczi , qemu-devel@nongnu.org, Stefan Hajnoczi , Asias He , MORITA Kazutaka 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 ? I remember this was one of the motivations to handle this failure. Regards, Bharata.