]> sourceware.org Git - lvm2.git/commitdiff
pvs: remove unnecessary label scan
authorDavid Teigland <teigland@redhat.com>
Fri, 3 May 2019 21:12:43 +0000 (16:12 -0500)
committerDavid Teigland <teigland@redhat.com>
Fri, 3 May 2019 21:16:29 +0000 (16:16 -0500)
The scanning rework missed removing this instance of label scan.
It's no longer needed because of the way that label scan is always
run once from the start of the command.  This unnecessary scan
would be triggered by running 'pvs @tag'.

tools/reporter.c

index 48050ec07571b6f84621d8acf8e9cec91b0ebe7b..db982b39384243ca9c0ebd0c81c197df1a7098f0 100644 (file)
@@ -708,7 +708,6 @@ int report_for_selection(struct cmd_context *cmd,
 static void _check_pv_list(struct cmd_context *cmd, struct report_args *args, struct single_report_args *single_args)
 {
        int i;
-       int rescan_done = 0;
 
        if (!args->argv)
                return;
@@ -719,12 +718,6 @@ static void _check_pv_list(struct cmd_context *cmd, struct report_args *args, st
 
        if (single_args->args_are_pvs && args->argc) {
                for (i = 0; i < args->argc; i++) {
-                       if (!rescan_done && !dev_cache_get(cmd, args->argv[i], cmd->filter)) {
-                               cmd->filter->wipe(cmd->filter);
-                               /* FIXME scan only one device */
-                               lvmcache_label_scan(cmd);
-                               rescan_done = 1;
-                       }
                        if (*args->argv[i] == '@') {
                                /*
                                 * Tags are metadata related, not label
@@ -732,13 +725,7 @@ static void _check_pv_list(struct cmd_context *cmd, struct report_args *args, st
                                 */
                                if (single_args->report_type == LABEL)
                                        single_args->report_type = PVS;
-                               /*
-                                * If we changed the report_type and we did rescan,
-                                * no need to iterate over dev list further - nothing
-                                * else would change.
-                                */
-                               if (rescan_done)
-                                       break;
+                               break;
                        }
                }
        }
This page took 0.035846 seconds and 5 git commands to generate.