diff options
author | Alexey Obitotskiy <aleksey.obitotskiy@intel.com> | 2017-01-09 13:12:22 +0100 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@gmail.com> | 2017-01-09 13:48:55 +0100 |
commit | d3c11416584cc973d0032dd0ff85ae86af8c13da (patch) | |
tree | 077c3b1649d7433a334dcbed211fc70e1fd138a3 /platform-intel.h | |
parent | Don't assume VMD sysfs path ends with a disk entry (diff) | |
download | mdadm-d3c11416584cc973d0032dd0ff85ae86af8c13da.tar.xz mdadm-d3c11416584cc973d0032dd0ff85ae86af8c13da.zip |
imsm: count arrays under VMD HBAs correctly
OROM defines maximum number of arrays supported. On array creation mdadm
checks if number of arrays doesn't exceed that limit, however it is not
calculated correctly for VMD now.
The current code performs a lookup of HBA using the id. VMD HBAs have
the same id so each lookup returns the same structure (first
encountered). Take a different approach for VMD HBAs. As id is not
unique and cannot be used for lookups, iterate over all VMD HBAs and
compare both id and HBA path.
Signed-off-by: Alexey Obitotskiy <aleksey.obitotskiy@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Diffstat (limited to 'platform-intel.h')
-rw-r--r-- | platform-intel.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/platform-intel.h b/platform-intel.h index 4851074c..29c85f12 100644 --- a/platform-intel.h +++ b/platform-intel.h @@ -251,4 +251,5 @@ const char *get_sys_dev_type(enum sys_dev_type); const struct orom_entry *get_orom_entry_by_device_id(__u16 dev_id); const struct imsm_orom *get_orom_by_device_id(__u16 device_id); struct sys_dev *device_by_id(__u16 device_id); +struct sys_dev *device_by_id_and_path(__u16 device_id, const char *path); char *vmd_domain_to_controller(struct sys_dev *hba, char *buf); |