qemu-e2k/block
Denis V. Lunev d50d822219 block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes
There is a possibility that we are extending our image and thus writing
zeroes beyond the end of the file. In this case we do not need to care
about the hole to make sure that there is no data in the file under
this offset (pre-condition to fallocate(0) to work). We could simply call
fallocate(0).

This improves the performance of writing zeroes even on really old
platforms which do not have even FALLOC_FL_PUNCH_HOLE.

Before the patch do_fallocate was used when either
CONFIG_FALLOCATE_PUNCH_HOLE or CONFIG_FALLOCATE_ZERO_RANGE are defined.
Now the story is different. CONFIG_FALLOCATE is defined when Linux
fallocate is defined, posix_fallocate is completely different story
(CONFIG_POSIX_FALLOCATE). CONFIG_FALLOCATE is mandatory prerequite
for both CONFIG_FALLOCATE_PUNCH_HOLE and CONFIG_FALLOCATE_ZERO_RANGE
thus we are on the safe side.

CC: Max Reitz <mreitz@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Peter Lieven <pl@kamp.de>
CC: Fam Zheng <famz@redhat.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-02-06 17:24:20 +01:00
..
accounting.c block: do not use get_clock() 2014-12-10 10:31:13 +01:00
archipelago.c
backup.c qmp: Add command 'blockdev-backup' 2015-01-13 11:47:56 +00:00
blkdebug.c blkdebug: Simplify and improve filename generation 2014-12-10 10:31:11 +01:00
blkverify.c
block-backend.c coroutine: drop qemu_coroutine_adjust_pool_size 2015-01-13 13:43:29 +00:00
bochs.c
cloop.c
commit.c block: let commit blockjob run in BDS AioContext 2014-11-03 11:41:49 +00:00
curl.c
dmg.c
gluster.c
iscsi.c block/iscsi: fix uninitialized variable 2015-01-03 09:22:13 +01:00
linux-aio.c linux-aio: simplify removal of completed iocbs from the list 2014-12-12 16:57:55 +00:00
Makefile.objs
mirror.c block: mirror - change string allocation to 2-bytes 2015-01-23 18:17:06 +01:00
nbd-client.c
nbd-client.h
nbd.c
nfs.c block/nfs: Add create_opts 2014-12-10 10:31:19 +01:00
null.c
parallels.c
qapi.c block: update string sizes for filename,backing_file,exact_filename 2015-01-23 18:17:06 +01:00
qcow2-cache.c
qcow2-cluster.c qcow2: Add two more unalignment checks 2015-01-23 18:17:05 +01:00
qcow2-refcount.c block/qcow2: Make get_refcount() global 2014-11-03 11:41:49 +00:00
qcow2-snapshot.c
qcow2.c block: update string sizes for filename,backing_file,exact_filename 2015-01-23 18:17:06 +01:00
qcow2.h block/qcow2: Make get_refcount() global 2014-11-03 11:41:49 +00:00
qcow.c block: update string sizes for filename,backing_file,exact_filename 2015-01-23 18:17:06 +01:00
qed-check.c
qed-cluster.c
qed-gencb.c
qed-l2-cache.c
qed-table.c
qed.c
qed.h
quorum.c
raw_bsd.c block: Make essential BlockDriver objects public 2014-12-10 10:31:19 +01:00
raw-aio.h linux-aio: drop return code from laio_io_unplug and ioq_submit 2014-12-12 16:57:55 +00:00
raw-posix.c block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes 2015-02-06 17:24:20 +01:00
raw-win32.c block: Make essential BlockDriver objects public 2014-12-10 10:31:19 +01:00
rbd.c block/rbd: fix memory leak 2014-12-12 13:16:56 +00:00
sheepdog.c
snapshot.c
ssh.c
stream.c block: let stream blockjob run in BDS AioContext 2014-11-03 11:41:49 +00:00
vdi.c block: remove BLOCK_OPT_NOCOW from vdi_create_opts 2014-12-10 10:31:20 +01:00
vhdx-endian.c
vhdx-log.c
vhdx.c block: vhdx - force FileOffsetMB field to '0' for certain block states 2015-01-23 12:41:32 -05:00
vhdx.h block: vhdx - update PAYLOAD_BLOCK_UNMAPPED value to match 1.00 spec 2014-12-12 15:42:22 +00:00
vmdk.c block: vmdk - move string allocations from stack to the heap 2015-01-23 18:17:05 +01:00
vpc.c block: remove BLOCK_OPT_NOCOW from vpc_create_opts 2014-12-10 10:31:21 +01:00
vvfat.c block: update string sizes for filename,backing_file,exact_filename 2015-01-23 18:17:06 +01:00
win32-aio.c