qemu-patch-raspberry4/include
Eric Blake 081dd1fe36 nbd: Implement NBD_INFO_BLOCK_SIZE on client
The upstream NBD Protocol has defined a new extension to allow
the server to advertise block sizes to the client, as well as
a way for the client to inform the server whether it intends to
obey block sizes.

When using the block layer as the client, we will obey block
sizes; but when used as 'qemu-nbd -c' to hand off to the
kernel nbd module as the client, we are still waiting for the
kernel to implement a way for us to learn if it will honor
block sizes (perhaps by an addition to sysfs, rather than an
ioctl), as well as any way to tell the kernel what additional
block sizes to obey (NBD_SET_BLKSIZE appears to be accurate
for the minimum size, but preferred and maximum sizes would
probably be new ioctl()s), so until then, we need to make our
request for block sizes conditional.

When using ioctl(NBD_SET_BLKSIZE) to hand off to the kernel,
use the minimum block size as the sector size if it is larger
than 512, which also has the nice effect of cooperating with
(non-qemu) servers that don't do read-modify-write when
exposing a block device with 4k sectors; it might also allow
us to visit a file larger than 2T on a 32-bit kernel.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20170707203049.534-10-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-07-14 12:04:42 +02:00
..
block nbd: Implement NBD_INFO_BLOCK_SIZE on client 2017-07-14 12:04:42 +02:00
chardev hmp: add hmp analogue for qmp-chardev-change 2017-07-14 11:04:34 +02:00
crypto block: pass option prefix down to crypto layer 2017-07-11 17:44:56 +02:00
disas Fix Thumb-1 BE32 execution and disassembly. 2017-02-07 18:29:59 +00:00
exec memory/iommu: introduce IOMMUMemoryRegionClass 2017-07-14 12:04:41 +02:00
fpu softfloat: define floatx80_round() 2017-06-29 20:27:39 +02:00
hw memory/iommu: introduce IOMMUMemoryRegionClass 2017-07-14 12:04:41 +02:00
io trivial patches for 2017-05-10 2017-05-10 12:31:19 -04:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration migration: Create load_setup()/cleanup() methods 2017-07-10 17:52:21 +01:00
monitor block: rip out all traces of password prompting 2017-07-11 17:44:56 +02:00
net slirp: add a fake NC-SI backend 2017-04-25 19:17:25 +08:00
qapi block: remove all encryption handling APIs 2017-07-11 17:44:56 +02:00
qemu memory/iommu: QOM'fy IOMMU MemoryRegion 2017-07-14 12:04:41 +02:00
qom qom/cpu: remove host_tid field 2017-07-14 12:04:41 +02:00
standard-headers linux-headers: update 2017-05-19 12:29:01 +02:00
sysemu Block layer patches 2017-07-13 13:38:57 +01:00
ui gtk: use framebuffer helper functions. 2017-06-21 14:23:16 +02:00
elf.h nios2: Add usermode binaries emulation 2017-01-24 13:10:35 -08:00
glib-compat.h qga: Add 'guest-get-users' command 2017-04-26 23:57:45 -05:00
qemu-common.h tcg: make tcg_allowed global 2017-07-04 16:01:16 +02:00
qemu-io.h hmp: Request permissions in qemu-io 2017-02-28 20:47:50 +01:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00