From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPUq0-00017G-1J for qemu-devel@nongnu.org; Fri, 27 Sep 2013 05:59:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPUpu-0001Fq-2Y for qemu-devel@nongnu.org; Fri, 27 Sep 2013 05:59:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPUpt-0001Fk-Qm for qemu-devel@nongnu.org; Fri, 27 Sep 2013 05:59:45 -0400 Date: Fri, 27 Sep 2013 11:59:41 +0200 From: Kevin Wolf Message-ID: <20130927095941.GH2440@dhcp-200-207.str.redhat.com> References: <1359392845-15905-1-git-send-email-benoit@irqsave.net> <1359392845-15905-4-git-send-email-benoit@irqsave.net> <5114D5AE.6070901@redhat.com> <20130926161655.GD3338@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20130926161655.GD3338@irqsave.net> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC V8 03/13] quorum: Add quorum_aio_writev and its dependencies. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: qemu-devel@nongnu.org, stefanha@redhat.com Am 26.09.2013 um 18:16 hat Beno=EEt Canet geschrieben: > > > +static void quorum_aio_bh(void *opaque) > > > +{ > > > + QuorumAIOCB *acb =3D opaque; > > > + BDRVQuorumState *s =3D acb->bqs; > > > + int ret; > > > + > > > + ret =3D s->threshold <=3D acb->success_count ? 0 : -EIO; > >=20 > > It would be very much preferable if you stored the actual error code > > instead of turning everything into -EIO. >=20 > I am turning everything into -EIO because multiple errors can happen at= the same > time. Picking simply the first error code seems better than throwing all information away. In the common case, I guess, you only have one error at a time anyway. And if you do have multiple errors, you can still fix one after another. Kevin