test/multipath: add helper to obtain secondary sessions
A number of existing tests create a secondary iSCSI session by logging into the target specified in the base sd during the test. With multipath sessions now connected during iscsi-test-cu startup (when launched with multiple URIs), secondary sessions can be provided via multipath when available, rather than reconnecting. This change adds a helper that conditionally returns the secondary multipath device if available, or falls back to creating a new session via the base sd target details. Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
@@ -30,6 +30,10 @@ mpath_check_matching_ids(int num_sds,
|
||||
int
|
||||
mpath_count_iscsi(int num_sds,
|
||||
struct scsi_device **sds);
|
||||
int
|
||||
mpath_sd2_get_or_clone(struct scsi_device *sd1, struct scsi_device **_sd2);
|
||||
void
|
||||
mpath_sd2_put(struct scsi_device *sd2);
|
||||
|
||||
#define MPATH_SKIP_IF_UNAVAILABLE(_sds, _num_sds) \
|
||||
do { \
|
||||
|
||||
Reference in New Issue
Block a user