Skip to content

blkio: introduce explicit state transition APIs

Stefan Hajnoczi requested to merge stefanha/libblkio:state-transition-apis into main

Instead of treating the blkio instance state as properties ("initialized" and "started"), provide dedicated APIs for them. This separates property accesses (e.g. getting/setting "num-queues") from state transition operations.

Also rename "initialized" to "connected" because that makes the difference with "created" more obvious:

created -> connected -> started

The new blkio_connect() and blkio_start() API will make it easier to add network block drivers in the future because asynchronous versions of the APIs will be needed for these operations. They can take an unbounded amount of time.

Suggested-by: Kevin Wolf kwolf@redhat.com Signed-off-by: Stefan Hajnoczi stefanha@redhat.com

Merge request reports