qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 04/15] block: add image streaming block job


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v4 04/15] block: add image streaming block job
Date: Thu, 12 Jan 2012 14:17:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

Am 12.01.2012 14:05, schrieb Stefan Hajnoczi:
> On Thu, Jan 12, 2012 at 12:53 PM, Kevin Wolf <address@hidden> wrote:
>> Am 12.01.2012 12:39, schrieb Stefan Hajnoczi:
>>> On Thu, Jan 12, 2012 at 10:59 AM, Kevin Wolf <address@hidden> wrote:
>>>> Am 06.01.2012 15:01, schrieb Stefan Hajnoczi:
>>>>> +    buf = qemu_blockalign(bs, STREAM_BUFFER_SIZE);
>>>>> +    s->common.len = bdrv_getlength(bs);
>>>>
>>>> No error check?
>>>
>>> Will fix.
>>>
>>>>> +    bdrv_get_geometry(bs, (uint64_t *)&end);
>>>>
>>>> Why call bdrv_getlength() twice? end = s->common.len >> BDRV_SECTOR_BITS
>>>> should be the same.
>>>
>>> Okay, I'll change it.  I got sick of BDRV_SECTOR_* and called twice instead.
>>
>> Well, you can try and change everything in the streaming code to bytes
>> instead of sectors. We should probably do this sooner or later anyway.
>> Sectors of 512 bytes are a completely arbitrary unit that doesn't make
>> much sense generally.
> 
> That doesn't work because block layer interfaces use nb_sectors.  We
> still need to convert.

Sure, somewhere you'll have the conversion. You can only push it a bit
closer to the invocation of the block drivers if you like. Everything
else would be a major refactoring (but eventually I think we'll do it).

Kevin



reply via email to

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