Re: [Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-02-16 Thread Kevin Wolf
Am 16.02.2017 um 19:23 hat Nir Soffer geschrieben: > On Thu, Feb 16, 2017 at 7:52 PM, Kevin Wolf wrote: > > Am 03.02.2017 um 20:50 hat Nir Soffer geschrieben: > >> When using file system that does not support fallocate() (e.g. NFS < > >> 4.2), truncating the file only when

Re: [Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-02-16 Thread Nir Soffer
On Thu, Feb 16, 2017 at 7:52 PM, Kevin Wolf wrote: > Am 03.02.2017 um 20:50 hat Nir Soffer geschrieben: >> When using file system that does not support fallocate() (e.g. NFS < >> 4.2), truncating the file only when preallocation=OFF speeds up creating >> raw file. >> >> Here is

Re: [Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-02-16 Thread Kevin Wolf
Am 03.02.2017 um 20:50 hat Nir Soffer geschrieben: > When using file system that does not support fallocate() (e.g. NFS < > 4.2), truncating the file only when preallocation=OFF speeds up creating > raw file. > > Here is example run, tested on Fedora 24 machine, creating raw file on > NFS version

Re: [Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-02-16 Thread Nir Soffer
Ping On Fri, Feb 3, 2017 at 9:50 PM, Nir Soffer wrote: > When using file system that does not support fallocate() (e.g. NFS < > 4.2), truncating the file only when preallocation=OFF speeds up creating > raw file. > > Here is example run, tested on Fedora 24 machine, creating

[Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-02-03 Thread Nir Soffer
When using file system that does not support fallocate() (e.g. NFS < 4.2), truncating the file only when preallocation=OFF speeds up creating raw file. Here is example run, tested on Fedora 24 machine, creating raw file on NFS version 3 server. $ time ./qemu-img-master create -f raw -o

[Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-01-27 Thread Nir Soffer
From: Nir Soffer When using file system that does not support fallocate(), posix_fallocate() fallback to emulation mode. In this mode, when preallocating blocks before file end, posix_preallocate is calling one pread() and one pwrite() per block. But when preallocation blocks