[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [Qemu-devel] [PATCH 1/4] block/curl: Use BDRV_SECTOR_S
From: |
Max Reitz |
Subject: |
Re: [Qemu-stable] [Qemu-devel] [PATCH 1/4] block/curl: Use BDRV_SECTOR_SIZE |
Date: |
Wed, 26 Oct 2016 16:39:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
On 25.10.2016 20:31, Eric Blake wrote:
> On 10/24/2016 09:54 PM, Max Reitz wrote:
>> Currently, curl defines its own constant SECTOR_SIZE. There is no
>> advantage over using the global BDRV_SECTOR_SIZE, so drop it.
>>
>> Cc: address@hidden
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>> block/curl.c | 11 +++++------
>> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> Reviewed-by: Eric Blake <address@hidden>
>
> (Can curl technically be used to access single-byte granularity? I
> suppose that would be a larger patch, though, to implement the right
> callbacks).
Yes, it definitely can, and yes, we definitely should implement it at
some point.
>> + DPRINTF("CURL (AIO): Reading %llu at %zd (%s)\n",
>> + (acb->nb_sectors * BDRV_SECTOR_SIZE), start, state->range);
>
> Eww. start is seriously limited to size_t rather than off_t? Doesn't
> that cripple us to a maximum of 4G files on 32-bit hosts? But unrelated
> to this patch.
Well, yes, it's all kind of yuck...
Thanks for reviewing, though!
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-stable] [PATCH 0/4] block/curl: Fix FTP, Max Reitz, 2016/10/24
- [Qemu-stable] [PATCH 1/4] block/curl: Use BDRV_SECTOR_SIZE, Max Reitz, 2016/10/24
- [Qemu-stable] [PATCH 2/4] block/curl: Fix return value from curl_read_cb, Max Reitz, 2016/10/24
- [Qemu-stable] [PATCH 3/4] block/curl: Remember all sockets, Max Reitz, 2016/10/24
- [Qemu-stable] [PATCH 4/4] block/curl: Do not wait for data beyond EOF, Max Reitz, 2016/10/24
- Re: [Qemu-stable] [Qemu-devel] [PATCH 0/4] block/curl: Fix FTP, Richard W.M. Jones, 2016/10/26