[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC V2 06/10] quorum: Add quorum_aio_writev and its de
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC V2 06/10] quorum: Add quorum_aio_writev and its dependencies. |
Date: |
Thu, 9 Aug 2012 10:35:25 +0100 |
On Thu, Aug 9, 2012 at 10:24 AM, Benoît Canet <address@hidden> wrote:
> Le Wednesday 08 Aug 2012 ŕ 16:37:13 (+0100), Stefan Hajnoczi a écrit :
>> On Tue, Aug 7, 2012 at 2:44 PM, Benoît Canet <address@hidden> wrote:
>> > +static int quorum_check_ret(QuorumAIOCB *acb)
>> > +{
>> > + int i, j;
>> > +
>> > + for (i = 0, j = 0; i <= 2; i++) {
>> > + if (acb->aios[0].ret) {
>> > + j++;
>> > + }
>> > + }
>> > +
>> > + if (j > 1) {
>> > + return -EIO;
>> > + }
>> > +
>> > + return 0;
>> > +}
>>
>> Simpler version just scans the return values (also I think
>> acb->aios[0].ret should be acb->aios[i].ret):
>>
>> static int quorum_check_ret(QuorumAIOCB *acb)
>> {
>> int i;
>> for (i = 0; i <= 2; i++) {
>> if (acb->aios[i].ret) {
>> return -EIO; /* or acb->aios[i].ret */
>> }
>> }
>> return 0;
>> }
>
> I am wondering what is the best code to return.
> There is some potential case like a filer containing a particular
> image (or a image on the network) going down where the user probably
> don't want to get an -EIO.
>
> The
> if (j > 1) {
> return -EIO;
> }
> part was about detecting an error count greater dans the threshold (2).
Yeah, this starts to get into policy and depends on the user. The
best we can do is to make it configurable and choose a sane default.
Stefan
[Qemu-devel] [RFC V2 09/10] quorum: Add quorum_aio_readv., Benoît Canet, 2012/08/07
[Qemu-devel] [RFC V2 07/10] blkverify: Make blkverify_iovec_clone() and blkverify_iovec_compare() public, Benoît Canet, 2012/08/07
[Qemu-devel] [RFC V2 10/10] quorum: Add quorum mechanism., Benoît Canet, 2012/08/07
Re: [Qemu-devel] [PATCH 00/10] Quorum disk image corruption resiliency, Stefan Hajnoczi, 2012/08/08