From b4dfe026dd38a3d84de48664f357828f05b36da2 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 13 Mar 2021 18:33:55 +0100 Subject: [PATCH] config: keep issue_discards in config struct Avoid quering for this config option and keep it for removing in struct. Also drop unused cache_vgmetadata variable. --- lib/commands/toolcontext.c | 2 ++ lib/commands/toolcontext.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index c3de18d7f..92008a641 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -661,6 +661,8 @@ static int _process_config(struct cmd_context *cmd) */ cmd->default_settings.udev_fallback = udev_disabled ? 1 : -1; + cmd->default_settings.issue_discards = find_config_tree_bool(cmd, devices_issue_discards_CFG, NULL); + init_retry_deactivation(find_config_tree_bool(cmd, activation_retry_deactivation_CFG, NULL)); init_activation_checks(find_config_tree_bool(cmd, activation_checks_CFG, NULL)); diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h index 977b31412..a47b7d760 100644 --- a/lib/commands/toolcontext.h +++ b/lib/commands/toolcontext.h @@ -39,7 +39,7 @@ struct config_info { int udev_rules; int udev_sync; int udev_fallback; - int cache_vgmetadata; + int issue_discards; const char *msg_prefix; const char *fmt_name; const char *dmeventd_executable;