]> git.proxmox.com Git - mirror_qemu.git/commit
virtio-blk: move dataplane code into virtio-blk.c
authorStefan Hajnoczi <stefanha@redhat.com>
Fri, 19 Jan 2024 13:57:43 +0000 (08:57 -0500)
committerKevin Wolf <kwolf@redhat.com>
Fri, 26 Jan 2024 10:16:58 +0000 (11:16 +0100)
commit3bcc17f06526754fd675dcf601414442044fa0b6
treef1d63b58476b221a9e045d63b1125ce45b0f976d
parenteffd60c878176bcaf97fa7ce2b12d04bb8ead6f7
virtio-blk: move dataplane code into virtio-blk.c

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>
hw/block/dataplane/meson.build
hw/block/dataplane/trace-events [deleted file]
hw/block/dataplane/trace.h [deleted file]
hw/block/dataplane/virtio-blk.c [deleted file]
hw/block/dataplane/virtio-blk.h [deleted file]
hw/block/virtio-blk.c
include/hw/virtio/virtio-blk.h
meson.build