mirror_qemu/include
Eric Blake 61cc872456 nbd: Advertise multi-conn for shared read-only connections
The NBD specification defines NBD_FLAG_CAN_MULTI_CONN, which can be
advertised when the server promises cache consistency between
simultaneous clients (basically, rules that determine what FUA and
flush from one client are able to guarantee for reads from another
client).  When we don't permit simultaneous clients (such as qemu-nbd
without -e), the bit makes no sense; and for writable images, we
probably have a lot more work before we can declare that actions from
one client are cache-consistent with actions from another.  But for
read-only images, where flush isn't changing any data, we might as
well advertise multi-conn support.  What's more, advertisement of the
bit makes it easier for clients to determine if 'qemu-nbd -e' was in
use, where a second connection will succeed rather than hang until the
first client goes away.

This patch affects qemu as server in advertising the bit.  We may want
to consider patches to qemu as client to attempt parallel connections
for higher throughput by spreading the load over those connections
when a server advertises multi-conn, but for now sticking to one
connection per nbd:// BDS is okay.

See also: https://bugzilla.redhat.com/1708300
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190815185024.7010-1-eblake@redhat.com>
[eblake: tweak blockdev-nbd.c to not request shared when writable,
fix iotest 233]
Reviewed-by: John Snow <jsnow@redhat.com>
2019-09-05 15:51:55 -05:00
..
authz Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
block nbd: Advertise multi-conn for shared read-only connections 2019-09-05 15:51:55 -05:00
chardev Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
crypto crypto: define cleanup functions for use with g_autoptr 2019-08-22 10:47:12 +01:00
disas include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
exec Allow page table bit to swap endianness. 2019-09-04 16:29:18 +01:00
fpu fpu: make softfloat-macros "self-contained" 2019-08-19 12:07:13 +01:00
hw virtio,vhost: fixes, features, cleanups. 2019-09-04 17:22:34 +01:00
io socket: Add num connections to qio_net_listener_open_sync() 2019-09-03 23:24:42 +02:00
libdecnumber include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
migration Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
monitor Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
net Include qemu/queue.h slightly less 2019-08-16 13:31:52 +02:00
qapi qapi: Split error.json off common.json 2019-08-16 13:31:51 +02:00
qemu socket: Add backlog parameter to socket_listen 2019-09-03 23:24:42 +02:00
qom hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
scsi scsi: explicitly list guest-recoverable sense codes 2019-07-15 11:20:42 +02:00
standard-headers kvm: i386: halt poll control MSR support 2019-08-20 17:26:17 +02:00
sysemu virtio,vhost: fixes, features, cleanups. 2019-09-04 17:22:34 +01:00
ui Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
elf.h linux-user: elf: ELF_HWCAP for s390x 2019-06-07 14:53:26 +02:00
glib-compat.h glib: bump min required glib library version to 2.48 2019-08-22 10:46:34 +01:00
qemu-common.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00