[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 07/14] mirror: Use BlockBackend for I/O

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 07/14] mirror: Use BlockBackend for I/O
Date: Fri, 13 May 2016 08:57:10 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 05/13/2016 08:38 AM, Max Reitz wrote:
> On 04.05.2016 11:39, Kevin Wolf wrote:
>> This changes the mirror block job to use the job's BlockBackend for
>> performing its I/O. job->bs isn't used by the mirroring code any more
>> afterwards.
>> Signed-off-by: Kevin Wolf <address@hidden>
>> ---

>> @@ -156,8 +156,8 @@ static void mirror_read_complete(void *opaque, int ret)
>>          mirror_iteration_done(op, ret);
>>          return;
>>      }
>> -    bdrv_aio_writev(s->target, op->sector_num, &op->qiov, op->nb_sectors,
>> -                    mirror_write_complete, op);
>> +    blk_aio_writev(s->target, op->sector_num, &op->qiov, op->nb_sectors,
>> +                   mirror_write_complete, op);
> Or maybe the rest doesn't look so good after all. We don't have this
> function anymore, I'm afraid.

Relatively mechanical conversion to
 blk_aio_pwritev(s->target, op->sector_num << BDRV_SECTOR_BITS,
                 &op->qiov, 0, mirror_write_complete, op)

although switching away from sectors to bytes in general is a bigger cleanup

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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