On 06/01/2017 10:54 PM, Eric Blake wrote:
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 <anton.nefe...@virtuozzo.com>
---
  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.



I would expect such filesystems to not support fallocate.

Though I must admit I can't see anywhere in the documentation that it MUST be strictly faster than writing zeroes; it would look very strange
to me if there were a slowpath fallback somewhere past the libc.

/Anton

Reply via email to