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 15:50:46 +0000

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.

Stefan



reply via email to

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