Am 26.09.2013 um 18:16 hat Benoît Canet geschrieben: > > > +static void quorum_aio_bh(void *opaque) > > > +{ > > > + QuorumAIOCB *acb = opaque; > > > + BDRVQuorumState *s = acb->bqs; > > > + int ret; > > > + > > > + ret = s->threshold <= acb->success_count ? 0 : -EIO; > > > > It would be very much preferable if you stored the actual error code > > instead of turning everything into -EIO. > > 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