qemu-e2k/block/export
Hanna Czenczek 1703eb1c27 block/fuse: Let PUNCH_HOLE write zeroes
fallocate(2) says about PUNCH_HOLE: "After a successful call, subsequent
reads from this range will return zeros."  As it is, PUNCH_HOLE is
implemented as a call to blk_pdiscard(), which does not guarantee this.

We must call blk_pwrite_zeroes() instead.  The difference to ZERO_RANGE
is that we pass the `BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK` flags to
the call -- the storage is supposed to be unmapped, and a slow fallback
by actually writing zeroes as data is not allowed.

Closes: https://gitlab.com/qemu-project/qemu/-/issues/1507
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-Id: <20230227104725.33511-2-hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-03-10 15:14:46 +01:00
..
export.c qapi block: Elide redundant has_FOO in generated C 2022-12-14 20:03:25 +01:00
fuse.c block/fuse: Let PUNCH_HOLE write zeroes 2023-03-10 15:14:46 +01:00
meson.build vduse-blk: Implement vduse-blk export 2022-06-24 17:07:06 +02:00
vduse-blk.c Fix non-first inclusions of qemu/osdep.h 2023-02-08 07:28:05 +01:00
vduse-blk.h vduse-blk: Implement vduse-blk export 2022-06-24 17:07:06 +02:00
vhost-user-blk-server.c vduse-blk: Add serial option 2022-06-24 17:07:06 +02:00
vhost-user-blk-server.h
virtio-blk-handler.c block/export: Abstract out the logic of virtio-blk I/O process 2022-06-24 17:07:06 +02:00
virtio-blk-handler.h vduse-blk: Add serial option 2022-06-24 17:07:06 +02:00