Re: [PATCH] virfile: safezero: fall back to writing block by block if mmap fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.10.2013 09:31, Oskari Saarenmaa wrote:
> mmap can fail on 32-bit systems if we're trying to zero out a lot of data.
> Fall back to using block-by-block writing in that case.  While we could map
> smaller blocks it's unlikely that this code is used a lot and its easier to
> just fall back to one of the existing methods.
> 
> Also modified the block-by-block zeroing to not allocate a megabyte of
> zeroes if we're writing less than that.
> 
> Signed-off-by: Oskari Saarenmaa <os@xxxxxxx>
> ---
>  src/util/virfile.c | 34 ++++++++++++++--------------------
>  1 file changed, 14 insertions(+), 20 deletions(-)

ACKed and pushed. Thanks for your contribution!

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]