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
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
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
pflash_cfi01.c Fix NOR flash device ID reading 2013-12-17 19:42:27 +00:00
pflash_cfi02.c
tc58128.c
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