[Top][All Lists]
[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.
- Re: [Qemu-devel] [RFC V2 05/10] quorum: Add quorum_getlength()., (continued)
[Qemu-devel] [RFC V2 08/10] quorum: Add quorum_co_flush()., Benoît Canet, 2012/08/07
[Qemu-devel] [RFC V2 06/10] quorum: Add quorum_aio_writev and its dependencies., Benoît Canet, 2012/08/07
[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