Blame SOURCES/0005-hints-remove-the-cmd-hints-list.patch

fabacb
From 00ebabfe6e1ebfceffcef335d44a6156a1c15418 Mon Sep 17 00:00:00 2001
fabacb
From: David Teigland <teigland@redhat.com>
fabacb
Date: Mon, 1 Nov 2021 16:01:09 -0500
4d51e5
Subject: [PATCH 05/54] hints: remove the cmd hints list
fabacb
fabacb
which is no longer used after commit
fabacb
"toollib: remove all devices list from process_each_pv"
fabacb
---
fabacb
 lib/commands/toolcontext.c | 2 --
fabacb
 lib/commands/toolcontext.h | 1 -
fabacb
 lib/label/hints.c          | 1 -
fabacb
 lib/label/label.c          | 8 ++------
fabacb
 4 files changed, 2 insertions(+), 10 deletions(-)
fabacb
fabacb
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
fabacb
index 105aecd5d..1b7170de1 100644
fabacb
--- a/lib/commands/toolcontext.c
fabacb
+++ b/lib/commands/toolcontext.c
fabacb
@@ -1605,7 +1605,6 @@ struct cmd_context *create_config_context(void)
fabacb
 
fabacb
 	dm_list_init(&cmd->config_files);
fabacb
 	dm_list_init(&cmd->tags);
fabacb
-	dm_list_init(&cmd->hints);
fabacb
 
fabacb
 	if (!_init_lvm_conf(cmd))
fabacb
 		goto_out;
fabacb
@@ -1670,7 +1669,6 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
fabacb
 	dm_list_init(&cmd->formats);
fabacb
 	dm_list_init(&cmd->segtypes);
fabacb
 	dm_list_init(&cmd->tags);
fabacb
-	dm_list_init(&cmd->hints);
fabacb
 	dm_list_init(&cmd->config_files);
fabacb
 	label_init();
fabacb
 
fabacb
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h
fabacb
index 701b7a739..356c79f8a 100644
fabacb
--- a/lib/commands/toolcontext.h
fabacb
+++ b/lib/commands/toolcontext.h
fabacb
@@ -206,7 +206,6 @@ struct cmd_context {
fabacb
 	 * Devices and filtering.
fabacb
 	 */
fabacb
 	struct dev_filter *filter;
fabacb
-	struct dm_list hints;
fabacb
 	struct dm_list use_devices;		/* struct dev_use for each entry in devices file */
fabacb
 	const char *md_component_checks;
fabacb
 	const char *search_for_devnames;	/* config file setting */
fabacb
diff --git a/lib/label/hints.c b/lib/label/hints.c
fabacb
index 3dba9f8ec..e444a0c82 100644
fabacb
--- a/lib/label/hints.c
fabacb
+++ b/lib/label/hints.c
fabacb
@@ -365,7 +365,6 @@ static void _unlock_hints(struct cmd_context *cmd)
fabacb
 
fabacb
 void hints_exit(struct cmd_context *cmd)
fabacb
 {
fabacb
-	free_hints(&cmd->hints);
fabacb
 	if (_hints_fd == -1)
fabacb
 		return;
fabacb
 	_unlock_hints(cmd);
fabacb
diff --git a/lib/label/label.c b/lib/label/label.c
fabacb
index 3cd912270..479a5037a 100644
fabacb
--- a/lib/label/label.c
fabacb
+++ b/lib/label/label.c
fabacb
@@ -1207,8 +1207,6 @@ int label_scan(struct cmd_context *cmd)
fabacb
 			 (unsigned long long)want_size_kb);
fabacb
 	}
fabacb
 
fabacb
-	dm_list_init(&cmd->hints);
fabacb
-
fabacb
 	/*
fabacb
 	 * If we're using hints to limit which devs we scanned, verify
fabacb
 	 * that those hints were valid, and if not we need to scan the
fabacb
@@ -1220,18 +1218,16 @@ int label_scan(struct cmd_context *cmd)
fabacb
 			_scan_list(cmd, cmd->filter, &all_devs, 0, NULL);
fabacb
 			/* scan_devs are the devs that have been scanned */
fabacb
 			dm_list_splice(&scan_devs, &all_devs);
fabacb
-			free_hints(&hints_list);
fabacb
 			using_hints = 0;
fabacb
 			create_hints = 0;
fabacb
 			/* invalid hints means a new dev probably appeared and
fabacb
 			   we should search for any missing pvids again. */
fabacb
 			unlink_searched_devnames(cmd);
fabacb
-		} else {
fabacb
-			/* The hints may be used by another device iteration. */
fabacb
-			dm_list_splice(&cmd->hints, &hints_list);
fabacb
 		}
fabacb
 	}
fabacb
 
fabacb
+	free_hints(&hints_list);
fabacb
+
fabacb
 	/*
fabacb
 	 * Check if the devices_file content is up to date and
fabacb
 	 * if not update it.
fabacb
-- 
4d51e5
2.34.3
fabacb