[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 2/6] block: add .bdrv_co_write_zeroes() inter
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v4 2/6] block: add .bdrv_co_write_zeroes() interface |
Date: |
Mon, 06 Feb 2012 17:00:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
Am 06.02.2012 16:50, schrieb Stefan Hajnoczi:
> On Tue, Jan 24, 2012 at 3:16 PM, Kevin Wolf <address@hidden> wrote:
>>> +/*
>>> + * Efficiently zero a region of the disk image. Note that this is a
>>> regular
>>> + * I/O request like read or write and should have a reasonable size. This
>>> + * function is not suitable for zeroing the entire image in a single
>>> request.
>>> + */
>>
>> The reason for this is that in the fallback case you allocate memory for
>> the whole request, right? So what about just limiting the allocation in
>> bdrv_co_do_write_zeroes() to a reasonable size and putting a loop there
>> for large requests?
>
> I'd rather not do that yet. We don't have a reasonable way to cancel
> such a request yet. In the future, if we decide we'd like to do huge
> bdrv_co_write_zeroes(), we could look at the details of making this
> work.
Do we even need a way to cancel such requests?
But anyway, include the reason in the comment, then we can leave it as
it is.
Kevin