On 06/01/2017 02:49 PM, Eric Blake wrote:
On 06/01/2017 10:14 AM, Anton Nefedov wrote:
Current write_zeroes implementation is good enough to satisfy this flag too
Signed-off-by: Anton Nefedov <address@hidden>
---
block/file-posix.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Are we sure that fallocate() is always fast, or are there some file
systems where it is no faster than manually writing zeroes? I'm worried
that blindly claiming BDRV_REQ_ALLOCATE may fail if we encounter a libc
not so much fail as in "break the guest", but fail as in "take far more
time than we were expecting, pessimising our behavior to worse than if
we had not tried the allocation at all"
or kernel-based fallback that takes a slow patch on our behalf.