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

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