Skip to content

Commit

Permalink
libmultipath: sysfs_set_scsi_tmo: do nothing for ACT_DRY_RUN
Browse files Browse the repository at this point in the history
"multipath -d" might change sysfs timeouts of SCSI devices.
Make sure it doesn't.

Signed-off-by: Martin Wilck <[email protected]>
Cc: Jehan Singh <[email protected]>
Reviewed-by: Benjamin Marzinski <[email protected]>
  • Loading branch information
mwilck committed Sep 7, 2023
1 parent f3004b4 commit cc63b60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libmultipath/configure.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,13 +1193,13 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,

if (cmpp)
mpp->queue_mode = cmpp->queue_mode;
if (cmd == CMD_DRY_RUN && mpp->action == ACT_UNDEF)
mpp->action = ACT_DRY_RUN;
if (setup_map(mpp, &params, vecs)) {
remove_map(mpp, vecs->pathvec, NULL);
continue;
}

if (cmd == CMD_DRY_RUN)
mpp->action = ACT_DRY_RUN;
if (mpp->action == ACT_UNDEF)
select_action(mpp, curmp,
force_reload == FORCE_RELOAD_YES ? 1 : 0);
Expand Down
3 changes: 3 additions & 0 deletions libmultipath/discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,9 @@ sysfs_set_scsi_tmo (struct config *conf, struct multipath *mpp)
bool warn_dev_loss = false;
bool warn_fast_io_fail = false;

if (mpp->action == ACT_DRY_RUN || mpp->action == ACT_REJECT)
return 0;

if (mpp->no_path_retry > 0) {
uint64_t no_path_retry_tmo =
(uint64_t)mpp->no_path_retry * conf->checkint;
Expand Down

0 comments on commit cc63b60

Please sign in to comment.