
4 Oct
2013
4 Oct
'13
6:33 a.m.
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@ohmu.fi> --- src/util/virfile.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-)
ACKed and pushed. Thanks for your contribution! Michal