block: Introduce BlockBackendPublic
commitf2cd875d54e95f87a4c994cfef082f09b4953aa9
authorKevin Wolf <kwolf@redhat.com>
Mon, 21 Mar 2016 10:27:04 +0000 (21 11:27 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 19 May 2016 14:45:29 +0000 (19 16:45 +0200)
tree82b8824108a6ac4f1cb1a16bee5963966535ebc6
parenta5614993d79584af93bb845f69f59872b3f76cf8
block: Introduce BlockBackendPublic

Some features, like I/O throttling, are implemented outside
block-backend.c, but still want to keep information in BlockBackend,
e.g. list entries that allow keeping a list of BlockBackends.

In order to avoid exposing the whole struct layout in the public header
file, this patch introduces an embedded public struct where such
information can be added and a pair of functions to convert between
BlockBackend and BlockBackendPublic.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
block/block-backend.c
include/sysemu/block-backend.h