Current OS-Brick FC code always scans all present HBAs, which could
unintentionally add unwanted devices, for example in the following
environment:
+-------+ +------+ +-----------------+
| host5 +-----+ +---+ Port.A VNX |
| | | FCSW +---+ Port.B |
| host6 +-----+ | +-----------------+
| | +------+
| | +------+
| host7 +-----+ | +-----------------+
| | | FCSW +---+ Port.C XtremIO |
| host8 +-----+ +---+ Port.D |
+-------+ +------+ +-----------------+
This patch limits what HBAs get scanned:
- If we have an initiator map, we only scan on the HBAs that are there
- If we are in the single WWNN for all ports case we only scan HBAs that
are connected
- If we can't do any better we scan all HBAs with wildcards
Closes-Bug: #1765000
Change-Id: I3ba8f9683211d550727a97fc455175f2b0482886