On Mon, Feb 6, 2012 at 4:00 PM, Kevin Wolf <kw...@redhat.com> wrote: > Am 06.02.2012 16:50, schrieb Stefan Hajnoczi: >> On Tue, Jan 24, 2012 at 3:16 PM, Kevin Wolf <kw...@redhat.com> 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