Skip to content

Commit

Permalink
virtio-blk: move dataplane code into virtio-blk.c
Browse files Browse the repository at this point in the history
The dataplane code used to be significantly different from the
non-dataplane code and therefore had a separate source file.

Over time the difference has gotten smaller because the I/O code paths
were unified. Nowadays the distinction between the VirtIOBlock and
VirtIOBlockDataPlane structs is more of an inconvenience that hinders
code simplification.

Move hw/block/dataplane/virtio-blk.c into hw/block/virtio-blk.c, merging
VirtIOBlockDataPlane's fields into VirtIOBlock.

hw/block/virtio-blk.c used VirtIOBlock->dataplane to check if
virtio_blk_data_plane_create() was successful. This is not necessary
because ->dataplane_started and ->dataplane_disabled can be used
instead. This patch makes those changes in order to drop
VirtIOBlock->dataplane.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20240119135748.270944-2-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
stefanhaRH authored and kevmw committed Jan 26, 2024
1 parent effd60c commit 3bcc17f
Show file tree
Hide file tree
Showing 8 changed files with 357 additions and 463 deletions.
1 change: 0 additions & 1 deletion hw/block/dataplane/meson.build
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
system_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c'))
specific_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c'))
5 changes: 0 additions & 5 deletions hw/block/dataplane/trace-events

This file was deleted.

1 change: 0 additions & 1 deletion hw/block/dataplane/trace.h

This file was deleted.

0 comments on commit 3bcc17f

Please sign in to comment.