[block] Add basic multipath support

Add basic support for multipath block devices.  The "sanboot" and
"sanhook" commands now accept a list of SAN URIs.  We open all URIs
concurrently.  The first connection to become available for issuing
block device commands is marked as the active path and used for all
subsequent commands; all other connections are then closed.  Whenever
the active path fails, we reopen all URIs and repeat the process.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2017-03-26 16:06:02 +03:00
parent c212597336
commit bb5a54b79a
10 changed files with 327 additions and 128 deletions
+3 -2
View File
@@ -26,8 +26,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <errno.h>
#include <ipxe/sanboot.h>
static int null_san_hook ( struct uri *uri __unused,
unsigned int drive __unused ) {
static int null_san_hook ( unsigned int drive __unused,
struct uri **uris __unused,
unsigned int count __unused ) {
return -EOPNOTSUPP;
}