Skip to content

Commit

Permalink
multipath: Don't always retry deletgated remove failures
Browse files Browse the repository at this point in the history
Now that multipathd is running the same code to remove devices as
multipath, multipath doesn't need to automatically retry the remove if
it fails.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
  • Loading branch information
bmarzins authored and mwilck committed Dec 14, 2023
1 parent 068a83f commit 86d215a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions multipath/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ enum {
int delegate_to_multipathd(enum mpath_cmds cmd,
__attribute__((unused)) const char *dev,
__attribute__((unused)) enum devtypes dev_type,
const struct config *conf)
struct config *conf)
{
int fd;
char command[1024], *p, *reply = NULL;
Expand All @@ -767,17 +767,17 @@ int delegate_to_multipathd(enum mpath_cmds cmd,
}
else if (cmd == CMD_FLUSH_ONE && dev && dev_type == DEV_DEVMAP) {
p += snprintf(p, n, "del map %s", dev);
/* multipathd doesn't try as hard, to avoid potentially
* hanging. If it fails, retry with the regular multipath
* command */
r = NOT_DELEGATED;
if (conf->remove_retries > 0) {
r = NOT_DELEGATED;
conf->remove_retries--;
}
}
else if (cmd == CMD_FLUSH_ALL) {
p += snprintf(p, n, "del maps");
/* multipathd doesn't try as hard, to avoid potentially
* hanging. If it fails, retry with the regular multipath
* command */
r = NOT_DELEGATED;
if (conf->remove_retries > 0) {
r = NOT_DELEGATED;
conf->remove_retries--;
}
}
/* Add other translations here */

Expand Down

0 comments on commit 86d215a

Please sign in to comment.