Skip to content

Commit

Permalink
multipathd: fix auto-resize configuration
Browse files Browse the repository at this point in the history
The code acted like AUTO_RESIZE_UNDEFINED didn't exist, but since
conf->auto_resize was never set to AUTO_RESIZE_NEVER, the default was in
fact AUTO_RESIZE_UNDEFINED, which ended up getting treated like
AUTO_RESIZE_GROW_SHRINK. Remove AUTO_RESIZE_UNDEFINED and explicitly
default auto_resize tp AUTO_RESIZE_NEVER.

Fixes: 981b83a ("multipathd: Add auto_resize config option")
Signed-off-by: Benjamin Marzinski <[email protected]>
Reviewed-by: Martin Wilck <[email protected]>
  • Loading branch information
bmarzins authored and mwilck committed Jan 17, 2024
1 parent fc8b102 commit 56476eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions libmultipath/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,7 @@ int _init_config (const char *file, struct config *conf)
conf->retrigger_tries = DEFAULT_RETRIGGER_TRIES;
conf->retrigger_delay = DEFAULT_RETRIGGER_DELAY;
conf->uev_wait_timeout = DEFAULT_UEV_WAIT_TIMEOUT;
conf->auto_resize = DEFAULT_AUTO_RESIZE;
conf->remove_retries = 0;
conf->ghost_delay = DEFAULT_GHOST_DELAY;
conf->all_tg_pt = DEFAULT_ALL_TG_PT;
Expand Down
1 change: 0 additions & 1 deletion libmultipath/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ enum queue_mode_states {
};

enum auto_resize_state {
AUTO_RESIZE_UNDEF = 0,
AUTO_RESIZE_NEVER,
AUTO_RESIZE_GROW_ONLY,
AUTO_RESIZE_GROW_SHRINK,
Expand Down

0 comments on commit 56476eb

Please sign in to comment.