mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
a66c9dc734
commit
21dff8cf38
2 changed files with 27 additions and 1 deletions
|
@ -46,6 +46,8 @@ struct DriveInfo {
|
|||
QTAILQ_ENTRY(DriveInfo) next;
|
||||
};
|
||||
|
||||
void override_max_devs(BlockInterfaceType type, int max_devs);
|
||||
|
||||
DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
|
||||
bool drive_check_orphaned(void);
|
||||
DriveInfo *drive_get_by_index(BlockInterfaceType type, int index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue