qemu-patch-raspberry4/include
Eric Blake 4df863f336 block: Make supported_write_flags a per-bds property
Pre-patch, .supported_write_flags lives at the driver level, which
means we are blindly declaring that all block devices using a
given driver will either equally support FUA, or that we need a
fallback at the block layer.  But there are drivers where FUA
support is a per-block decision: the NBD block driver is dependent
on the remote server advertising NBD_FLAG_SEND_FUA (and has
fallback code to duplicate the flush that the block layer would do
if NBD had not set .supported_write_flags); and the iscsi block
driver is dependent on the mode sense bits advertised by the
underlying device (and is currently silently ignoring FUA requests
if the underlying device does not support FUA).

The fix is to make supported flags as a per-BDS option, set during
.bdrv_open().  This patch moves the variable and fixes NBD and iscsi
to set it only conditionally; later patches will then further
simplify the NBD driver to quit duplicating work done at the block
layer, as well as tackle the fact that SCSI does not support FUA
semantics on WRITESAME(10/16) but only on WRITE(10/16).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-05-12 15:22:09 +02:00
..
block block: Make supported_write_flags a per-bds property 2016-05-12 15:22:09 +02:00
crypto include/crypto: Include qapi-types.h or qemu/bswap.h instead of qemu-common.h 2016-03-22 22:20:16 +01:00
disas disas: Add print_insn to disassemble info 2015-07-09 15:20:40 +02:00
exec qemu-log: dfilter-ise exec, out_asm, op and opt_op 2016-03-22 22:20:18 +01:00
fpu include: Clean up includes 2016-02-23 12:43:05 +00:00
hw virtio-input: support absolute axis config in pass-through 2016-04-13 17:26:12 +02:00
io io: implement socket watch for win32 using WSAEventSelect+select 2016-03-10 17:19:07 +00:00
libdecnumber include: Clean up includes 2016-02-23 12:43:05 +00:00
migration migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context 2016-02-26 20:39:50 +05:30
monitor Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
net Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
qapi Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
qemu event-notifier: Add "is_external" parameter 2016-04-22 16:43:56 +02:00
qom qom: -object error messages lost location, restore it 2016-04-28 08:19:36 +02:00
standard-headers update Linux headers to 4.6 2016-04-05 11:46:52 +02:00
sysemu block: Kill unused sector-based blk_* functions 2016-05-12 15:22:09 +02:00
ui ui/virtio-gpu: add and use qemu_create_displaysurface_pixman 2016-04-11 12:32:01 +02:00
elf.h include: Clean up includes 2016-02-23 12:43:05 +00:00
glib-compat.h glib: add compatibility interface for g_hash_table_add() 2015-10-30 09:01:03 +01:00
qemu-common.h util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
qjson.h QJSON: Add JSON writer 2015-02-05 17:16:14 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00