virtio-blk: set config size depending on the features enabled

Starting from DISABLE and WRITE_ZEROES features, we use an array of
VirtIOFeature (as virtio-net) to properly set the config size
depending on the features enabled.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-id: 20190221103314.58500-6-sgarzare@redhat.com
Message-Id: <20190221103314.58500-6-sgarzare@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Stefano Garzarella 2019-02-21 11:33:09 +01:00 committed by Stefan Hajnoczi
parent ba550851f5
commit 20764be042
2 changed files with 26 additions and 6 deletions

View file

@ -56,6 +56,7 @@ typedef struct VirtIOBlock {
bool dataplane_started;
struct VirtIOBlockDataPlane *dataplane;
uint64_t host_features;
size_t config_size;
} VirtIOBlock;
typedef struct VirtIOBlockReq {