From 88e809efacbc8610c51f04dbb5eaa55e331086e7 Mon Sep 17 00:00:00 2001 From: Packit Date: Aug 25 2020 07:44:52 +0000 Subject: Apply patch 0030-multipath-add-option-to-skip-multipathd-delegation.patch patch_name: 0030-multipath-add-option-to-skip-multipathd-delegation.patch location_in_specfile: 30 present_in_specfile: true --- diff --git a/libmultipath/config.h b/libmultipath/config.h index 4042eba..160867c 100644 --- a/libmultipath/config.h +++ b/libmultipath/config.h @@ -191,6 +191,7 @@ struct config { int ghost_delay; int find_multipaths_timeout; int marginal_pathgroups; + int skip_delegate; unsigned int version[3]; unsigned int sequence_nr; diff --git a/multipath/main.c b/multipath/main.c index 612c681..3c3d239 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -825,6 +825,9 @@ int delegate_to_multipathd(enum mpath_cmds cmd, *p = '\0'; n = sizeof(command); + if (conf->skip_delegate) + return NOT_DELEGATED; + if (cmd == CMD_CREATE && conf->force_reload == FORCE_RELOAD_YES) { p += snprintf(p, n, "reconfigure"); } @@ -923,7 +926,7 @@ main (int argc, char *argv[]) multipath_conf = conf; conf->retrigger_tries = 0; conf->force_sync = 1; - while ((arg = getopt(argc, argv, ":aAdcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) { + while ((arg = getopt(argc, argv, ":aAdDcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) { switch(arg) { case 1: printf("optarg : %s\n",optarg); break; @@ -955,6 +958,9 @@ main (int argc, char *argv[]) if (cmd == CMD_CREATE) cmd = CMD_DRY_RUN; break; + case 'D': + conf->skip_delegate = 1; + break; case 'f': cmd = CMD_FLUSH_ONE; break;