qemu-e2k/hw/block
Stefan Hajnoczi 54bee5c2b4 dataplane: replace iothread object_add() with embedded instance
Before IOThread was its own object, each virtio-blk device would create
its own internal thread.  We need to preserve this behavior for
backwards compatibility when users do not specify -device
virtio-blk-pci,iothread=<id>.

This patch changes how the internal IOThread object is created.
Previously we used the monitor object_add() function, which is really a
layering violation.  The problem is that this needs to assign a name but
we don't have a name for this internal object.

Generating names for internal objects is a pain but even worse is that
they may collide with user-defined names.

Paolo Bonzini <pbonzini@redhat.com> suggested that the internal IOThread
object should not be named.  This way the conflict cannot happen and we
no longer need object_add().

One gotcha is that internal IOThread objects will not be listed by the
query-iothreads command since they are not named.  This is okay though
because query-iothreads is new and the internal IOThread is just for
backwards compatibility.  New users should explicitly define IOThread
objects.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-04 20:48:13 +02:00
..
dataplane dataplane: replace iothread object_add() with embedded instance 2014-04-04 20:48:13 +02:00
block.c
cdrom.c bswap.h: Remove cpu_to_be32wu() 2013-11-05 19:57:47 -08:00
ecc.c
fdc.c qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
hd-geometry.c
m25p80.c block/m25p80: Remove FROM_SSI_SLAVE() usages 2014-03-12 20:13:02 +01:00
Makefile.objs pc_sysfw: do not make it a device anymore 2013-08-12 09:31:14 -05:00
nand.c nand: Don't use qdev_create() in nand_init() 2014-02-14 16:22:31 +01:00
nvme.c nvme: Permit zero-length block devices 2014-03-31 22:35:03 +02:00
nvme.h
onenand.c onenand: QOM cast cleanup 2013-07-29 21:05:58 +02:00
pflash_cfi01.c Fix NOR flash device ID reading 2013-12-17 19:42:27 +00:00
pflash_cfi02.c pflash_cfi02.c: fix debug macro 2013-09-01 19:32:42 +04:00
tc58128.c shix: Don't require firmware presence for qtest 2013-11-05 17:47:29 +01:00
virtio-blk.c block: rename buffer_alignment to guest_block_size 2014-01-24 17:40:01 +01:00
xen_blkif.h
xen_disk.c Block patches 2014-02-25 10:50:11 +00:00