virtio-blk/dataplane: parentize compat iothread
PATCH 1/1 virtio-blk/dataplane: parentize compat iothread
For x-data-plane=true, we create an iothread automatically for compatibility. Commit d21e877 ("iothread: include id in thread name") exposed that this iothread missed correct parenthood: fix this.
--- hw/block/dataplane/virtio-blk.c | 3 +++ 1 file changed, 3 insertions(+)
hw/block/dataplane/virtio-blk.c +3 -0
@@ -187,6 +187,9 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,object_initialize (&s->internal_iothread_obj,sizeof (s->internal_iothread_obj),TYPE_IOTHREAD ); +object_property_add_child (OBJECT (conf),TYPE_IOTHREAD , +OBJECT (&s->internal_iothread_obj), + &error_abort);user_creatable_complete (OBJECT (&s->internal_iothread_obj), &error_abort); s->iothread = &s->internal_iothread_obj; }
Signature · 1 line
2.3.9
Quoted 14 lines · On Mon, 7 Dec 2015 16:50:01 +0100 Cornelia Huck <[email protected]>…
For x-data-plane=true, we create an iothread automatically for compatibility. Commit d21e877 ("iothread: include id in thread name") exposed that this iothread missed correct parenthood: fix this.
Signed-off-by Cornelia Huck <[email protected]>--- hw/block/dataplane/virtio-blk.c | 3 +++ 1 file changed, 3 insertions(+)hw/block/dataplane/virtio-blk.c +0
-0
hw/block/dataplane/virtio-blk.c void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf, · line 195
Quoted 9 lines
hw/block/dataplane/virtio-blk.c +3
-0@@ -187,6 +187,9 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,object_initialize (&s->internal_iothread_obj,sizeof (s->internal_iothread_obj),TYPE_IOTHREAD ); +object_property_add_child (OBJECT (conf),TYPE_IOTHREAD , +OBJECT (&s->internal_iothread_obj), + &error_abort);user_creatable_complete (OBJECT (&s->internal_iothread_obj), &error_abort); s->iothread = &s->internal_iothread_obj; }
Scratch that, does not work... (I thought I was hitting the other segfault in the block backend processing...)
Quoted 21 lines · Cornelia Huck
Quoted 18 lines · On Mon, 7 Dec 2015 16:50:01 +0100 Cornelia Huck <[email protected]>…
For x-data-plane=true, we create an iothread automatically for compatibility. Commit d21e877 ("iothread: include id in thread name") exposed that this iothread missed correct parenthood: fix this.
Signed-off-by Cornelia Huck <[email protected]>--- hw/block/dataplane/virtio-blk.c | 3 +++ 1 file changed, 3 insertions(+)hw/block/dataplane/virtio-blk.c +1
-0@@ -187,6 +187,9 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,object_initialize (&s->internal_iothread_obj,sizeof (s->internal_iothread_obj),TYPE_IOTHREAD ); + object_property_add_child(OBJECT(conf), TYPE_IOTHREAD,
Quoted 8 lines
hw/block/dataplane/virtio-blk.c void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf, · line 195
Quoted 5 lines
hw/block/dataplane/virtio-blk.c +2
-0+OBJECT (&s->internal_iothread_obj), + &error_abort);user_creatable_complete (OBJECT (&s->internal_iothread_obj), &error_abort); s->iothread = &s->internal_iothread_obj; }Scratch that, does not work... (I thought I was hitting the other segfault in the block backend processing...)
Should I go ahead and apply Fam's "remove x-data-plane" patch then?
thanks
-- PMM
Quoted 31 lines · On Mon, 7 Dec 2015 16:33:11 +0000 Peter Maydell <[email protected]>…
Quoted 21 lines · Cornelia Huck
Quoted 18 lines · On Mon, 7 Dec 2015 16:50:01 +0100 Cornelia Huck <[email protected]>…
For x-data-plane=true, we create an iothread automatically for compatibility. Commit d21e877 ("iothread: include id in thread name") exposed that this iothread missed correct parenthood: fix this.
Signed-off-by Cornelia Huck <[email protected]>--- hw/block/dataplane/virtio-blk.c | 3 +++ 1 file changed, 3 insertions(+)hw/block/dataplane/virtio-blk.c +1
-0@@ -187,6 +187,9 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,object_initialize (&s->internal_iothread_obj,sizeof (s->internal_iothread_obj),TYPE_IOTHREAD ); + object_property_add_child(OBJECT(conf), TYPE_IOTHREAD,Quoted 8 lines
hw/block/dataplane/virtio-blk.c void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf, · line 195
Quoted 5 lines
hw/block/dataplane/virtio-blk.c +2
-0+OBJECT (&s->internal_iothread_obj), + &error_abort);user_creatable_complete (OBJECT (&s->internal_iothread_obj), &error_abort); s->iothread = &s->internal_iothread_obj; }Scratch that, does not work... (I thought I was hitting the other segfault in the block backend processing...)
Quoted 1 line
Should I go ahead and apply Fam's "remove x-data-plane" patch then?
That's probably the quickest solution, as the iothread name patch is useful and I haven't been able to come up with a correct patch.