virtio-mem: Simplify bitmap handling and virtio_mem_set_block_state()
commit25c893037b89ddd4e42927a2a9b524dbbc0c34a3
authorDavid Hildenbrand <david@redhat.com>
Tue, 23 May 2023 18:30:36 +0000 (23 20:30 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 23 Jun 2023 06:54:44 +0000 (23 02:54 -0400)
tree7e4c7439013b509b2c5802843b9354ccf83e389e
parent8eb85fb5ac60bfb6ee4c729cc087078d490670c4
virtio-mem: Simplify bitmap handling and virtio_mem_set_block_state()

Let's separate plug and unplug handling to prepare for future changes
and make the code a bit easier to read -- working on block states
(plugged/unplugged) instead of on a bitmap.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Gavin Shan <gshan@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20230523183036.517957-1-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-mem.c