qemu-devel
[Top][All Lists]
Advanced

[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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4 2/6] block: add .bdrv_co_write_zeroes() interface
Date: Mon, 6 Feb 2012 16:16:33 +0000

On Mon, Feb 6, 2012 at 4:00 PM, Kevin Wolf <address@hidden> wrote:
> 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?

I think so.  Any long-running operation tends to come with cancel/abort.

> But anyway, include the reason in the comment, then we can leave it as
> it is.

Okay, will add it.

Stefan



reply via email to

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