blockdev: Allow overriding if_max_dev property
commit21dff8cf38d311a917ab33f19d5cea7696f0c354
authorJohn Snow <jsnow@redhat.com>
Wed, 1 Oct 2014 18:19:25 +0000 (1 14:19 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 3 Oct 2014 09:30:33 +0000 (3 10:30 +0100)
treed396c06d9c1fe5bbbf010b8996382cdc9aa899a3
parenta66c9dc734fb30de1e18e9dc217f2d37e16c492a
blockdev: Allow overriding if_max_dev property

The if_max_devs table as in the past been an immutable
default that controls the mapping of index => (bus,unit)
for all boards and all HBAs for each interface type.

Since adding this mapping information to the HBA device
itself is currently unwieldly from the perspective of
retrieving this information at option parsing time
(e.g, within drive_new), we consider the alternative
of marking the if_max_devs table mutable so that
later configuration and initialization can adjust the
mapping at will, but only up until a drive is added,
at which point the mapping is finalized.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1412187569-23452-3-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
blockdev.c
include/sysemu/blockdev.h