qemu-e2k/include
Eric Blake 86a3d5c688 block: Add .bdrv_co_block_status() callback
We are gradually moving away from sector-based interfaces, towards
byte-based. Now that the block layer exposes byte-based allocation,
it's time to tackle the drivers.  Add a new callback that operates
on as small as byte boundaries. Subsequent patches will then update
individual drivers, then finally remove .bdrv_co_get_block_status().

The new code also passes through the 'want_zero' hint, which will
allow subsequent patches to further optimize callers that only care
about how much of the image is allocated (want_zero is false),
rather than full details about runs of zeroes and which offsets the
allocation actually maps to (want_zero is true).  As part of this
effort, fix another part of the documentation: the claim in commit
4c41cb4 that BDRV_BLOCK_ALLOCATED is short for 'DATA || ZERO' is a
lie at the block layer (see commit e88ae2264), even though it is
how the bit is computed from the driver layer.  After all, there
are intentionally cases where we return ZERO but not ALLOCATED at
the block layer, when we know that a read sees zero because the
backing file is too short.  Note that the driver interface is thus
slightly different than the public interface with regards to which
bits will be set, and what guarantees are provided on input.

We also add an assertion that any driver using the new callback will
make progress (the only time pnum will be 0 is if the block layer
already handled an out-of-bounds request, or if there is an error);
the old driver interface did not provide this guarantee, which
could lead to some inf-loops in drastic corner-case failures.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-03-02 18:39:07 +01:00
..
block block: Add .bdrv_co_block_status() callback 2018-03-02 18:39:07 +01:00
chardev
crypto
disas
exec include/exec/helper-head.h: support f16 in helper calls 2018-03-01 11:13:59 +00:00
fpu arm/translate-a64: add FP16 FR[ECP/SQRT]S to simd_three_reg_same_fp16 2018-03-01 11:13:59 +00:00
hw hw/arm/iotkit: Model Arm IOT Kit 2018-03-02 11:03:45 +00:00
io io: Fix QIOChannelFile when creating and opening read-write 2018-02-15 16:54:57 +00:00
libdecnumber
migration virtio,vhost,pci,pc: features, fixes and cleanups 2018-02-13 16:33:31 +00:00
monitor
net net/can: simple messages transport implementation for QEMU 2018-02-13 11:44:13 +01:00
qapi
qemu fpu/softfloat-types: new header to prevent excessive re-builds 2018-02-21 10:20:19 +00:00
qom
scsi
standard-headers virtio-gpu-3d: add support for second capability set (v4) 2018-02-26 13:41:34 +01:00
sysemu cryptodev-vhost-user: set the key length 2018-03-01 18:26:17 +02:00
ui console/opengl: split up dpy_gl_cursor ops 2018-02-22 10:35:00 +01:00
elf.h linux-user: MIPS set cpu to r6 CPU if binary is R6 2018-02-25 17:29:45 +01:00
glib-compat.h
qemu-common.h
qemu-io.h
trace-tcg.h