qemu-patch-raspberry4/include
Eric Blake 7423f41782 nbd: Limit nbdflags to 16 bits
Rather than asserting that nbdflags is within range, just give
it the correct type to begin with :)  nbdflags corresponds to
the per-export portion of NBD Protocol "transmission flags", which
is 16 bits in response to NBD_OPT_EXPORT_NAME and NBD_OPT_GO.

Furthermore, upstream NBD has never passed the global flags to
the kernel via ioctl(NBD_SET_FLAGS) (the ioctl was first
introduced in NBD 2.9.22; then a latent bug in NBD 3.1 actually
tried to OR the global flags with the transmission flags, with
the disaster that the addition of NBD_FLAG_NO_ZEROES in 3.9
caused all earlier NBD 3.x clients to treat every export as
read-only; NBD 3.10 and later intentionally clip things to 16
bits to pass only transmission flags).  Qemu should follow suit,
since the current two global flags (NBD_FLAG_FIXED_NEWSTYLE
and NBD_FLAG_NO_ZEROES) have no impact on the kernel's behavior
during transmission.

CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>

Message-Id: <1469129688-22848-3-git-send-email-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-08-03 18:44:56 +02:00
..
block nbd: Limit nbdflags to 16 bits 2016-08-03 18:44:56 +02:00
crypto crypto: add support for querying parameters for block encryption 2016-07-26 17:46:37 +02:00
disas disas: Fix ATTRIBUTE_UNUSED define clash with ALSA headers 2016-07-19 16:40:39 +01:00
exec exec: Reduce CONFIG_USER_ONLY ifdeffenery 2016-07-26 15:31:58 -03:00
fpu Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
hw pc, pci, virtio: cleanups, fixes 2016-07-29 11:57:01 +01:00
io Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
monitor Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
net net: Use correct type for bool flag 2016-07-19 20:18:27 +02:00
qapi blockjob: Update description of the 'id' field 2016-07-13 13:26:02 +02:00
qemu util: Drop inet_listen() 2016-08-02 12:03:58 +02:00
qom exec: Set cpu_index only if it's not been explictly set 2016-07-26 15:32:01 -03:00
standard-headers linux-headers: update 2016-06-14 13:34:50 +02:00
sysemu char: add chr_wait_connected callback 2016-07-29 00:33:48 +03:00
ui gtk: fix build 2016-07-11 10:40:29 +01:00
elf.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
glib-compat.h vhost-user-test: fix g_cond_wait_until compat implementation 2016-06-29 16:49:40 +02:00
qemu-common.h qemu-common.h: Drop WORDS_ALIGNED define 2016-06-07 18:19:24 +03:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
trace-tcg.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
trace.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00