]> sourceware.org Git - lvm2.git/commitdiff
hints: remove the cmd hints list
authorDavid Teigland <teigland@redhat.com>
Mon, 1 Nov 2021 21:01:09 +0000 (16:01 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 1 Nov 2021 21:01:45 +0000 (16:01 -0500)
which is no longer used after commit
"toollib: remove all devices list from process_each_pv"

lib/commands/toolcontext.c
lib/commands/toolcontext.h
lib/label/hints.c
lib/label/label.c

index 105aecd5d8dabbf1131ddd4bde93136da01873ef..1b7170de1a95103bd11c522f32d02d6af5ca545f 100644 (file)
@@ -1605,7 +1605,6 @@ struct cmd_context *create_config_context(void)
 
        dm_list_init(&cmd->config_files);
        dm_list_init(&cmd->tags);
-       dm_list_init(&cmd->hints);
 
        if (!_init_lvm_conf(cmd))
                goto_out;
@@ -1670,7 +1669,6 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
        dm_list_init(&cmd->formats);
        dm_list_init(&cmd->segtypes);
        dm_list_init(&cmd->tags);
-       dm_list_init(&cmd->hints);
        dm_list_init(&cmd->config_files);
        label_init();
 
index 701b7a739c7c007b5f6dfa7fca821446d69247b6..356c79f8a45817350abf971e94b91d4fa34b5b57 100644 (file)
@@ -206,7 +206,6 @@ struct cmd_context {
         * Devices and filtering.
         */
        struct dev_filter *filter;
-       struct dm_list hints;
        struct dm_list use_devices;             /* struct dev_use for each entry in devices file */
        const char *md_component_checks;
        const char *search_for_devnames;        /* config file setting */
index 3dba9f8eccb3c4e7080611e178e88cda8c90f079..e444a0c82c79e3b93c33bb7ec6bb53516c2db840 100644 (file)
@@ -365,7 +365,6 @@ static void _unlock_hints(struct cmd_context *cmd)
 
 void hints_exit(struct cmd_context *cmd)
 {
-       free_hints(&cmd->hints);
        if (_hints_fd == -1)
                return;
        _unlock_hints(cmd);
index 3cd91227032d9707390b39f487c841b6930f2b40..479a5037afc1ceb8ec4891ce1c65238f8c7427de 100644 (file)
@@ -1207,8 +1207,6 @@ int label_scan(struct cmd_context *cmd)
                         (unsigned long long)want_size_kb);
        }
 
-       dm_list_init(&cmd->hints);
-
        /*
         * If we're using hints to limit which devs we scanned, verify
         * that those hints were valid, and if not we need to scan the
@@ -1220,18 +1218,16 @@ int label_scan(struct cmd_context *cmd)
                        _scan_list(cmd, cmd->filter, &all_devs, 0, NULL);
                        /* scan_devs are the devs that have been scanned */
                        dm_list_splice(&scan_devs, &all_devs);
-                       free_hints(&hints_list);
                        using_hints = 0;
                        create_hints = 0;
                        /* invalid hints means a new dev probably appeared and
                           we should search for any missing pvids again. */
                        unlink_searched_devnames(cmd);
-               } else {
-                       /* The hints may be used by another device iteration. */
-                       dm_list_splice(&cmd->hints, &hints_list);
                }
        }
 
+       free_hints(&hints_list);
+
        /*
         * Check if the devices_file content is up to date and
         * if not update it.
This page took 0.045979 seconds and 5 git commands to generate.