qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC V2 09/10] quorum: Add quorum_aio_readv.


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC V2 09/10] quorum: Add quorum_aio_readv.
Date: Wed, 8 Aug 2012 16:46:04 +0100

On Wed, Aug 8, 2012 at 4:44 PM, Stefan Hajnoczi <address@hidden> wrote:
> On Tue, Aug 7, 2012 at 2:44 PM, Benoît Canet <address@hidden> wrote:
>> @@ -224,6 +232,32 @@ static void quorum_aio_cb(void *opaque, int ret)
>>      }
>>  }
>>
>> +static BlockDriverAIOCB *quorum_aio_readv(BlockDriverState *bs,
>> +                                         int64_t sector_num,
>> +                                         QEMUIOVector *qiov,
>> +                                         int nb_sectors,
>> +                                         BlockDriverCompletionFunc *cb,
>> +                                         void *opaque)
>> +{
>> +    BDRVQuorumState *s = bs->opaque;
>> +    QuorumAIOCB *acb = quorum_aio_get(bs, qiov, sector_num,
>> +                                      nb_sectors, cb, opaque);
>> +    int i;
>> +
>> +    for (i = 0; i <= 2; i++) {
>> +        acb->aios[i].buf = qemu_blockalign(bs->file, qiov->size);
>> +        qemu_iovec_init(&acb->qiovs[i], qiov->niov);
>> +        blkverify_iovec_clone(&acb->qiovs[i], qiov, acb->aios[i].buf);
>> +    }
>> +
>> +    for (i = 0; i <= 2; i++) {
>> +        bdrv_aio_readv(s->bs[i], sector_num, qiov, nb_sectors,
>> +                       quorum_aio_cb, &acb->aios[i]);
>
> acb->qiovs[i] instead of qiov.

Ah, I now see this was intentional because voting hasn't been added yet.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]